diff options
Diffstat (limited to 'googletest/test/googletest-catch-exceptions-test_.cc')
-rw-r--r-- | googletest/test/googletest-catch-exceptions-test_.cc | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/googletest/test/googletest-catch-exceptions-test_.cc b/googletest/test/googletest-catch-exceptions-test_.cc index 09dae70..75d1d2d 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: @@ -296,7 +277,7 @@ TEST(CxxExceptionTest, ThrowsNonStdCxxException) { // ones. void TerminateHandler() { fprintf(stderr, "%s\n", "Unhandled C++ exception terminating the program."); - fflush(NULL); + fflush(nullptr); exit(3); } |