aboutsummaryrefslogtreecommitdiffstats
path: root/include/gtest/gtest-death-test.h
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-09-11 06:59:42 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-09-11 06:59:42 +0000
commitb2ee82ebf9b8f1be859d08611b768ae6c0700090 (patch)
treee9ef0e2d46fce05fcdf325c28b21c0c412567eda /include/gtest/gtest-death-test.h
parentf6dd67a1550d25518cc37758364834f4f92a3570 (diff)
downloadgoogletest-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 'include/gtest/gtest-death-test.h')
-rw-r--r--include/gtest/gtest-death-test.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/gtest/gtest-death-test.h b/include/gtest/gtest-death-test.h
index 410654b9..677e1e1a 100644
--- a/include/gtest/gtest-death-test.h
+++ b/include/gtest/gtest-death-test.h
@@ -260,7 +260,7 @@ class KilledBySignal {
// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and
// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if
-// death tests are supported; otherwise they expand to empty. This is
+// death tests are supported; otherwise they just issue a warning. This is
// useful when you are combining death test assertions with normal test
// assertions in one test.
#if GTEST_HAS_DEATH_TEST
@@ -270,13 +270,9 @@ class KilledBySignal {
ASSERT_DEATH(statement, regex)
#else
#define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
- GTEST_LOG_(WARNING, \
- "Death tests are not supported on this platform. The statement" \
- " '" #statement "' can not be verified")
+ GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, )
#define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
- GTEST_LOG_(WARNING, \
- "Death tests are not supported on this platform. The statement" \
- " '" #statement "' can not be verified")
+ GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, return)
#endif
} // namespace testing