From bc9df6ad46f4aab2717024e2d2bce9c3d56450d9 Mon Sep 17 00:00:00 2001 From: misterg Date: Fri, 14 Sep 2018 12:02:05 -0400 Subject: [PATCH 1/2] Googletest export Removing checks for C++11 from unit tests PiperOrigin-RevId: 212990514 --- googletest/test/gtest_unittest.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc index fa102240..701ba204 100644 --- a/googletest/test/gtest_unittest.cc +++ b/googletest/test/gtest_unittest.cc @@ -63,9 +63,7 @@ TEST(CommandLineFlagsTest, CanBeAccessedInCodeOnceGTestHIsIncluded) { #include #include #include -#if GTEST_LANG_CXX11 #include -#endif // GTEST_LANG_CXX11 #include "gtest/gtest-spi.h" #include "src/gtest-internal-inl.h" @@ -5156,8 +5154,7 @@ TEST(AssertionResultTest, CanStreamOstreamManipulators) { EXPECT_STREQ("Data\n\\0Will be visible", r.message()); } -// The next test uses explicit conversion operators -- a C++11 feature. -#if GTEST_LANG_CXX11 +// The next test uses explicit conversion operators TEST(AssertionResultTest, ConstructibleFromContextuallyConvertibleToBool) { struct ExplicitlyConvertibleToBool { @@ -5170,8 +5167,6 @@ TEST(AssertionResultTest, ConstructibleFromContextuallyConvertibleToBool) { EXPECT_TRUE(v2); } -#endif // GTEST_LANG_CXX11 - struct ConvertibleToAssertionResult { operator AssertionResult() const { return AssertionResult(true); } }; @@ -7555,7 +7550,6 @@ TEST(IsContainerTestTest, WorksForContainer) { sizeof(IsContainerTest >(0))); } -#if GTEST_LANG_CXX11 struct ConstOnlyContainerWithPointerIterator { using const_iterator = int*; const_iterator begin() const; @@ -7577,7 +7571,6 @@ TEST(IsContainerTestTest, ConstOnlyContainer) { EXPECT_EQ(sizeof(IsContainer), sizeof(IsContainerTest(0))); } -#endif // GTEST_LANG_CXX11 // Tests IsHashTable. struct AHashTable { @@ -7590,10 +7583,8 @@ struct NotReallyAHashTable { TEST(IsHashTable, Basic) { EXPECT_TRUE(testing::internal::IsHashTable::value); EXPECT_FALSE(testing::internal::IsHashTable::value); -#if GTEST_LANG_CXX11 EXPECT_FALSE(testing::internal::IsHashTable>::value); EXPECT_TRUE(testing::internal::IsHashTable>::value); -#endif // GTEST_LANG_CXX11 #if GTEST_HAS_HASH_SET_ EXPECT_TRUE(testing::internal::IsHashTable<__gnu_cxx::hash_set>::value); #endif // GTEST_HAS_HASH_SET_ From fc2caf6485f7065787f081765c0282837323960b Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Fri, 14 Sep 2018 15:34:13 -0400 Subject: [PATCH 2/2] Update .travis.yml Remove pre C++11 --- .travis.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4e7413a4..4ec239fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,10 +29,6 @@ matrix: group: deprecated-2017Q4 compiler: gcc env: BUILD_TYPE=Debug VERBOSE=1 CXX_FLAGS=-std=c++11 - - os: linux - group: deprecated-2017Q4 - compiler: clang - env: BUILD_TYPE=Debug VERBOSE=1 - os: linux group: deprecated-2017Q4 compiler: clang @@ -40,16 +36,9 @@ matrix: - os: linux compiler: clang env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 NO_EXCEPTION=ON NO_RTTI=ON COMPILER_IS_GNUCXX=ON - - os: osx - compiler: gcc - env: BUILD_TYPE=Debug VERBOSE=1 - os: osx compiler: gcc env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 - - os: osx - compiler: clang - env: BUILD_TYPE=Debug VERBOSE=1 - if: type != pull_request - os: osx env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 if: type != pull_request