aboutsummaryrefslogtreecommitdiffstats
path: root/test/gtest_catch_exceptions_test.py
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2012-05-31 20:37:13 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2012-05-31 20:37:13 +0000
commita3b859162dd7a4a1798cf8753a03098f2cbdb62e (patch)
treeed3a1185c93839b0026103187b5fad7dd349f359 /test/gtest_catch_exceptions_test.py
parentcdb24f86d56e5a3ff84b6f1fa71e0b33f22d9152 (diff)
downloadgoogletest-a3b859162dd7a4a1798cf8753a03098f2cbdb62e.tar.gz
googletest-a3b859162dd7a4a1798cf8753a03098f2cbdb62e.tar.bz2
googletest-a3b859162dd7a4a1798cf8753a03098f2cbdb62e.zip
Fixes threading annotations and compatibility with C++11, which doesn't
allow exepctions to be thrown in a destructor.
Diffstat (limited to 'test/gtest_catch_exceptions_test.py')
-rwxr-xr-xtest/gtest_catch_exceptions_test.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/test/gtest_catch_exceptions_test.py b/test/gtest_catch_exceptions_test.py
index 7fd7dbad..d7ef10eb 100755
--- a/test/gtest_catch_exceptions_test.py
+++ b/test/gtest_catch_exceptions_test.py
@@ -117,14 +117,17 @@ class CatchCxxExceptionsTest(gtest_test_utils.TestCase):
'"CxxExceptionInConstructorTest" (no quotes) '
'appears on the same line as words "called unexpectedly"')
- def testCatchesCxxExceptionsInFixtureDestructor(self):
- self.assert_('C++ exception with description '
- '"Standard C++ exception" thrown '
- 'in the test fixture\'s destructor'
- in EX_BINARY_OUTPUT)
- self.assert_('CxxExceptionInDestructorTest::TearDownTestCase() '
- 'called as expected.'
- in EX_BINARY_OUTPUT)
+ if ('CxxExceptionInDestructorTest.ThrowsExceptionInDestructor' in
+ EX_BINARY_OUTPUT):
+
+ def testCatchesCxxExceptionsInFixtureDestructor(self):
+ self.assert_('C++ exception with description '
+ '"Standard C++ exception" thrown '
+ 'in the test fixture\'s destructor'
+ in EX_BINARY_OUTPUT)
+ self.assert_('CxxExceptionInDestructorTest::TearDownTestCase() '
+ 'called as expected.'
+ in EX_BINARY_OUTPUT)
def testCatchesCxxExceptionsInSetUpTestCase(self):
self.assert_('C++ exception with description "Standard C++ exception"'