summaryrefslogtreecommitdiffstats
path: root/googletest
diff options
context:
space:
mode:
authormisterg <misterg@google.com>2018-10-04 16:10:01 -0400
committerGennadiy Civil <misterg@google.com>2018-10-04 16:10:50 -0400
commitf13bbe2992d188e834339abe6f715b2b2f840a77 (patch)
tree0acb06ff98de3d685c144c738f678fdb4dd7cc3b /googletest
parentbea3d619757e6844a11b4f7c2f85ee05b73abd41 (diff)
downloadgoogletest-f13bbe2992d188e834339abe6f715b2b2f840a77.tar.gz
googletest-f13bbe2992d188e834339abe6f715b2b2f840a77.zip
Remove checking for C++ 11 and a pre-C++11 test from googletest tests
PiperOrigin-RevId: 215789971
Diffstat (limited to 'googletest')
-rw-r--r--googletest/test/googletest-catch-exceptions-test_.cc19
-rw-r--r--googletest/test/googletest-param-test-test.cc9
-rw-r--r--googletest/test/googletest-printers-test.cc6
3 files changed, 1 insertions, 33 deletions
diff --git a/googletest/test/googletest-catch-exceptions-test_.cc b/googletest/test/googletest-catch-exceptions-test_.cc
index 09dae700..f1708a90 100644
--- a/googletest/test/googletest-catch-exceptions-test_.cc
+++ b/googletest/test/googletest-catch-exceptions-test_.cc
@@ -137,25 +137,6 @@ TEST_F(CxxExceptionInConstructorTest, ThrowsExceptionInConstructor) {
<< "called unexpectedly.";
}
-// Exceptions in destructors are not supported in C++11.
-#if !GTEST_LANG_CXX11
-class CxxExceptionInDestructorTest : public Test {
- public:
- static void TearDownTestCase() {
- printf("%s",
- "CxxExceptionInDestructorTest::TearDownTestCase() "
- "called as expected.\n");
- }
-
- protected:
- ~CxxExceptionInDestructorTest() {
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(
- throw std::runtime_error("Standard C++ exception"));
- }
-};
-
-TEST_F(CxxExceptionInDestructorTest, ThrowsExceptionInDestructor) {}
-#endif // C++11 mode
class CxxExceptionInSetUpTestCaseTest : public Test {
public:
diff --git a/googletest/test/googletest-param-test-test.cc b/googletest/test/googletest-param-test-test.cc
index f789cab2..be9548ed 100644
--- a/googletest/test/googletest-param-test-test.cc
+++ b/googletest/test/googletest-param-test-test.cc
@@ -535,8 +535,6 @@ TEST(CombineTest, CombineWithMaxNumberOfParameters) {
VerifyGenerator(gen, expected_values);
}
-#if GTEST_LANG_CXX11
-
class NonDefaultConstructAssignString {
public:
NonDefaultConstructAssignString(const std::string& s) : str_(s) {}
@@ -579,7 +577,6 @@ TEST(CombineTest, NonDefaultConstructAssign) {
EXPECT_TRUE(it == gen.end());
}
-#endif // GTEST_LANG_CXX11
# endif // GTEST_HAS_COMBINE
// Tests that an generator produces correct sequence after being
@@ -913,8 +910,6 @@ INSTANTIATE_TEST_CASE_P(CustomParamNameFunction,
Values(std::string("FunctionName")),
CustomParamNameFunction);
-#if GTEST_LANG_CXX11
-
// Test custom naming with a lambda
class CustomLambdaNamingTest : public TestWithParam<std::string> {};
@@ -926,8 +921,6 @@ INSTANTIATE_TEST_CASE_P(CustomParamNameLambda, CustomLambdaNamingTest,
return inf.param;
});
-#endif // GTEST_LANG_CXX11
-
TEST(CustomNamingTest, CheckNameRegistry) {
::testing::UnitTest* unit_test = ::testing::UnitTest::GetInstance();
std::set<std::string> test_names;
@@ -944,9 +937,7 @@ TEST(CustomNamingTest, CheckNameRegistry) {
}
EXPECT_EQ(1u, test_names.count("CustomTestNames/FunctorName"));
EXPECT_EQ(1u, test_names.count("CustomTestNames/FunctionName"));
-#if GTEST_LANG_CXX11
EXPECT_EQ(1u, test_names.count("CustomTestNames/LambdaName"));
-#endif // GTEST_LANG_CXX11
}
// Test a numeric name to ensure PrintToStringParamName works correctly.
diff --git a/googletest/test/googletest-printers-test.cc b/googletest/test/googletest-printers-test.cc
index 6e26274e..87fdd28a 100644
--- a/googletest/test/googletest-printers-test.cc
+++ b/googletest/test/googletest-printers-test.cc
@@ -1109,9 +1109,7 @@ TEST(PrintStdTupleTest, NestedTuple) {
EXPECT_EQ("((5, true), 'a' (97, 0x61))", Print(nested));
}
-#endif // GTEST_LANG_CXX11
-
-#if GTEST_LANG_CXX11
+#endif // GTEST_HAS_TR1_TUPLE
TEST(PrintNullptrT, Basic) {
EXPECT_EQ("(nullptr)", Print(nullptr));
@@ -1131,8 +1129,6 @@ TEST(PrintReferenceWrapper, Unprintable) {
Print(std::cref(up)));
}
-#endif // GTEST_LANG_CXX11
-
// Tests printing user-defined unprintable types.
// Unprintable types in the global namespace.
OpenPOWER on IntegriCloud