diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-09-16 06:59:17 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-09-16 06:59:17 +0000 |
commit | 2962b23886e9b922398b573fadfa7993f1cb26d7 (patch) | |
tree | b3e87b28fc5283e1e0ac9222b5a0df5f3ada3484 /test/gtest-death-test_test.cc | |
parent | d541f0259d2f6857df769f581363f84e8c4b2899 (diff) | |
download | googletest-2962b23886e9b922398b573fadfa7993f1cb26d7.tar.gz |
Simplifies the implementation of GTEST_LOG_ & GTEST_LOG_; renames
GTEST_HIDE_UNREACHABLE_CODE_ to
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_ (by Vlad Losev).
git-svn-id: http://googletest.googlecode.com/svn/trunk@307 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'test/gtest-death-test_test.cc')
-rw-r--r-- | test/gtest-death-test_test.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/gtest-death-test_test.cc b/test/gtest-death-test_test.cc index f56f35d..1b0061a 100644 --- a/test/gtest-death-test_test.cc +++ b/test/gtest-death-test_test.cc @@ -143,7 +143,7 @@ class MayDie { // A member function that may die. void MemberFunction() const { if (should_die_) { - GTEST_LOG_(FATAL, "death inside MayDie::MemberFunction()."); + GTEST_LOG_(FATAL) << "death inside MayDie::MemberFunction()."; } } @@ -154,26 +154,26 @@ class MayDie { // A global function that's expected to die. void GlobalFunction() { - GTEST_LOG_(FATAL, "death inside GlobalFunction()."); + GTEST_LOG_(FATAL) << "death inside GlobalFunction()."; } // A non-void function that's expected to die. int NonVoidFunction() { - GTEST_LOG_(FATAL, "death inside NonVoidFunction()."); + GTEST_LOG_(FATAL) << "death inside NonVoidFunction()."; return 1; } // A unary function that may die. void DieIf(bool should_die) { if (should_die) { - GTEST_LOG_(FATAL, "death inside DieIf()."); + GTEST_LOG_(FATAL) << "death inside DieIf()."; } } // A binary function that may die. bool DieIfLessThan(int x, int y) { if (x < y) { - GTEST_LOG_(FATAL, "death inside DieIfLessThan()."); + GTEST_LOG_(FATAL) << "death inside DieIfLessThan()."; } return true; } @@ -188,7 +188,7 @@ void DeathTestSubroutine() { int DieInDebugElse12(int* sideeffect) { if (sideeffect) *sideeffect = 12; #ifndef NDEBUG - GTEST_LOG_(FATAL, "debug death inside DieInDebugElse12()"); + GTEST_LOG_(FATAL) << "debug death inside DieInDebugElse12()"; #endif // NDEBUG return 12; } |