aboutsummaryrefslogtreecommitdiffstats
path: root/test/gtest-port_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/gtest-port_test.cc')
-rw-r--r--test/gtest-port_test.cc7
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";