aboutsummaryrefslogtreecommitdiffstats
path: root/test/gtest-death-test_test.cc
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 /test/gtest-death-test_test.cc
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 'test/gtest-death-test_test.cc')
-rw-r--r--test/gtest-death-test_test.cc12
1 files changed, 6 insertions, 6 deletions
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;
}