From 866f4a94461d765f7f9514b6cb6e82d7b9ea12d2 Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Wed, 16 Sep 2009 06:59:17 +0000 Subject: Simplifies the implementation of GTEST_LOG_ & GTEST_LOG_; renames GTEST_HIDE_UNREACHABLE_CODE_ to GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_ (by Vlad Losev). --- test/gtest-death-test_test.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/gtest-death-test_test.cc b/test/gtest-death-test_test.cc index f56f35dc..1b0061a6 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; } -- cgit v1.2.3