diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-09-11 06:59:42 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-09-11 06:59:42 +0000 |
commit | b2ee82ebf9b8f1be859d08611b768ae6c0700090 (patch) | |
tree | e9ef0e2d46fce05fcdf325c28b21c0c412567eda /test/gtest-port_test.cc | |
parent | f6dd67a1550d25518cc37758364834f4f92a3570 (diff) | |
download | googletest-b2ee82ebf9b8f1be859d08611b768ae6c0700090.tar.gz googletest-b2ee82ebf9b8f1be859d08611b768ae6c0700090.tar.bz2 googletest-b2ee82ebf9b8f1be859d08611b768ae6c0700090.zip |
Improves EXPECT_DEATH_IF_SUPPORTED to allow streaming of messages and enforcing the validity of arguments (by Vlad Losev); adds samples for the event listener API (by Vlad Losev); simplifies the tests using EXPECT_DEATH_IF_SUPPORTED (by Zhanyong Wan).
Diffstat (limited to 'test/gtest-port_test.cc')
-rw-r--r-- | test/gtest-port_test.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/gtest-port_test.cc b/test/gtest-port_test.cc index d980b7ce..97859515 100644 --- a/test/gtest-port_test.cc +++ b/test/gtest-port_test.cc @@ -133,8 +133,6 @@ TEST(GetThreadCountTest, ReturnsZeroWhenUnableToCountThreads) { } #endif // GTEST_OS_MAC -#if GTEST_HAS_DEATH_TEST - TEST(GtestCheckDeathTest, DiesWithCorrectOutputOnFailure) { const bool a_false_condition = false; const char regex[] = @@ -145,9 +143,12 @@ TEST(GtestCheckDeathTest, DiesWithCorrectOutputOnFailure) { #endif // _MSC_VER ".*a_false_condition.*Extra info.*"; - EXPECT_DEATH(GTEST_CHECK_(a_false_condition) << "Extra info", regex); + EXPECT_DEATH_IF_SUPPORTED(GTEST_CHECK_(a_false_condition) << "Extra info", + regex); } +#if GTEST_HAS_DEATH_TEST + TEST(GtestCheckDeathTest, LivesSilentlyOnSuccess) { EXPECT_EXIT({ GTEST_CHECK_(true) << "Extra info"; |