aboutsummaryrefslogtreecommitdiffstats
path: root/include/gtest/internal/gtest-death-test-internal.h
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-09-16 06:59:17 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-09-16 06:59:17 +0000
commit866f4a94461d765f7f9514b6cb6e82d7b9ea12d2 (patch)
treeb3e87b28fc5283e1e0ac9222b5a0df5f3ada3484 /include/gtest/internal/gtest-death-test-internal.h
parentb2ee82ebf9b8f1be859d08611b768ae6c0700090 (diff)
downloadgoogletest-866f4a94461d765f7f9514b6cb6e82d7b9ea12d2.tar.gz
googletest-866f4a94461d765f7f9514b6cb6e82d7b9ea12d2.tar.bz2
googletest-866f4a94461d765f7f9514b6cb6e82d7b9ea12d2.zip
Simplifies the implementation of GTEST_LOG_ & GTEST_LOG_; renames
GTEST_HIDE_UNREACHABLE_CODE_ to GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_ (by Vlad Losev).
Diffstat (limited to 'include/gtest/internal/gtest-death-test-internal.h')
-rw-r--r--include/gtest/internal/gtest-death-test-internal.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/include/gtest/internal/gtest-death-test-internal.h b/include/gtest/internal/gtest-death-test-internal.h
index d87bfa93..78fbae90 100644
--- a/include/gtest/internal/gtest-death-test-internal.h
+++ b/include/gtest/internal/gtest-death-test-internal.h
@@ -172,7 +172,7 @@ bool ExitedUnsuccessfully(int exit_status);
case ::testing::internal::DeathTest::EXECUTE_TEST: { \
::testing::internal::DeathTest::ReturnSentinel \
gtest_sentinel(gtest_dt); \
- GTEST_HIDE_UNREACHABLE_CODE_(statement); \
+ GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \
break; \
} \
@@ -253,17 +253,15 @@ InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag();
// statement unconditionally returns or throws. The Message constructor at
// the end allows the syntax of streaming additional messages into the
// macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH.
-// TODO(vladl@google.com): rename the GTEST_HIDE_UNREACHABLE_CODE_ macro to
-// GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_.
#define GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, terminator) \
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
if (::testing::internal::AlwaysTrue()) { \
- GTEST_LOG_(WARNING, \
- "Death tests are not supported on this platform.\n" \
- "Statement '" #statement "' cannot be verified."); \
+ GTEST_LOG_(WARNING) \
+ << "Death tests are not supported on this platform.\n" \
+ << "Statement '" #statement "' cannot be verified."; \
} else if (!::testing::internal::AlwaysTrue()) { \
::testing::internal::RE::PartialMatch(".*", (regex)); \
- GTEST_HIDE_UNREACHABLE_CODE_(statement); \
+ GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
terminator; \
} else \
::testing::Message()