diff options
author | zhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386> | 2009-09-11 07:01:08 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386> | 2009-09-11 07:01:08 +0000 |
commit | 04d6ed817e40f676225e0bf20ff1470d8f0c4a20 (patch) | |
tree | f6abff9eb8a6e4e7696414b6b881e1f5857b2cd7 /test/gmock-port_test.cc | |
parent | d6ffd13698d17215c2069e036a179f22cb1289a6 (diff) | |
download | googletest-04d6ed817e40f676225e0bf20ff1470d8f0c4a20.tar.gz googletest-04d6ed817e40f676225e0bf20ff1470d8f0c4a20.tar.bz2 googletest-04d6ed817e40f676225e0bf20ff1470d8f0c4a20.zip |
Simplifies the tests using EXPECT_DEATH_IF_SUPPORTED.
Diffstat (limited to 'test/gmock-port_test.cc')
-rw-r--r-- | test/gmock-port_test.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/gmock-port_test.cc b/test/gmock-port_test.cc index 2e85bccd..7335405c 100644 --- a/test/gmock-port_test.cc +++ b/test/gmock-port_test.cc @@ -65,8 +65,6 @@ TEST(GmockCheckSyntaxTest, WorksWithSwitch) { GMOCK_CHECK_(true) << "Check failed in switch case"; } -#if GTEST_HAS_DEATH_TEST - TEST(GmockCheckDeathTest, DiesWithCorrectOutputOnFailure) { const bool a_false_condition = false; // MSVC and gcc use different formats to print source file locations. @@ -81,9 +79,12 @@ TEST(GmockCheckDeathTest, DiesWithCorrectOutputOnFailure) { #endif // _MSC_VER ".*a_false_condition.*Extra info"; - EXPECT_DEATH(GMOCK_CHECK_(a_false_condition) << "Extra info", regex); + EXPECT_DEATH_IF_SUPPORTED(GMOCK_CHECK_(a_false_condition) << "Extra info", + regex); } +#if GTEST_HAS_DEATH_TEST + TEST(GmockCheckDeathTest, LivesSilentlyOnSuccess) { EXPECT_EXIT({ GMOCK_CHECK_(true) << "Extra info"; |