diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-05-05 23:13:43 (GMT) |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-05-05 23:13:43 (GMT) |
commit | 42abea350d4f26a006f760fae0d1f9882deb9221 (patch) | |
tree | 7b897744aa871de2cda218509fe8d16bf11991ba /test/gtest_break_on_failure_unittest.py | |
parent | 9b23e3cc7677643f6adaf6c327275d0a7cdff02c (diff) | |
download | googletest-42abea350d4f26a006f760fae0d1f9882deb9221.zip googletest-42abea350d4f26a006f760fae0d1f9882deb9221.tar.gz googletest-42abea350d4f26a006f760fae0d1f9882deb9221.tar.bz2 |
Uses DebugBreak() to properly break on Windows (by Vlad Losev).
Diffstat (limited to 'test/gtest_break_on_failure_unittest.py')
-rwxr-xr-x | test/gtest_break_on_failure_unittest.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/gtest_break_on_failure_unittest.py b/test/gtest_break_on_failure_unittest.py index c9dd008..c312ce2 100755 --- a/test/gtest_break_on_failure_unittest.py +++ b/test/gtest_break_on_failure_unittest.py @@ -57,6 +57,9 @@ BREAK_ON_FAILURE_FLAG = 'gtest_break_on_failure' # The environment variable for enabling/disabling the throw-on-failure mode. THROW_ON_FAILURE_ENV_VAR = 'GTEST_THROW_ON_FAILURE' +# The environment variable for enabling/disabling the catch-exceptions mode. +CATCH_EXCEPTIONS_ENV_VAR = 'GTEST_CATCH_EXCEPTIONS' + # Path to the gtest_break_on_failure_unittest_ program. EXE_PATH = gtest_test_utils.GetTestExecutablePath( 'gtest_break_on_failure_unittest_') @@ -194,5 +197,18 @@ class GTestBreakOnFailureUnitTest(unittest.TestCase): finally: SetEnvVar(THROW_ON_FAILURE_ENV_VAR, None) + if IS_WINDOWS: + def testCatchExceptionsDoesNotInterfere(self): + """Tests that gtest_catch_exceptions doesn't interfere.""" + + SetEnvVar(CATCH_EXCEPTIONS_ENV_VAR, '1') + try: + self.RunAndVerify(env_var_value='1', + flag_value='1', + expect_seg_fault=1) + finally: + SetEnvVar(CATCH_EXCEPTIONS_ENV_VAR, None) + + if __name__ == '__main__': gtest_test_utils.Main() |