Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: base/logging_unittest.cc

Issue 2827313003: Follow-up to LoggingTest.NestedLogAssertHandlers test fix in #466051 (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging_unittest.cc
diff --git a/base/logging_unittest.cc b/base/logging_unittest.cc
index bd3d836688239e9e042d493e990d42d7c5fbd234..5cb3d05cf83ee191a870ee7593958039e3c108e6 100644
--- a/base/logging_unittest.cc
+++ b/base/logging_unittest.cc
@@ -519,32 +519,34 @@ TEST_F(LoggingTest, NestedLogAssertHandlers) {
EXPECT_CALL(
handler_a,
HandleLogAssert(
- _, _, base::StringPiece("First assert must be catched by handler_a"),
+ _, _, base::StringPiece("First assert must be caught by handler_a"),
_));
EXPECT_CALL(
handler_b,
HandleLogAssert(
- _, _, base::StringPiece("Second assert must be catched by handler_b"),
+ _, _, base::StringPiece("Second assert must be caught by handler_b"),
_));
EXPECT_CALL(
handler_a,
HandleLogAssert(
_, _,
- base::StringPiece("Last assert must be catched by handler_a again"),
+ base::StringPiece("Last assert must be caught by handler_a again"),
_));
logging::ScopedLogAssertHandler scoped_handler_a(base::Bind(
&MockLogAssertHandler::HandleLogAssert, base::Unretained(&handler_a)));
- LOG(FATAL) << "First assert must be catched by handler_a";
+ // Using LOG(FATAL) rather than CHECK(false) here since log messages aren't
+ // preserved for CHECKs in official builds.
+ LOG(FATAL) << "First assert must be caught by handler_a";
{
logging::ScopedLogAssertHandler scoped_handler_b(base::Bind(
&MockLogAssertHandler::HandleLogAssert, base::Unretained(&handler_b)));
- LOG(FATAL) << "Second assert must be catched by handler_b";
+ LOG(FATAL) << "Second assert must be caught by handler_b";
}
- LOG(FATAL) << "Last assert must be catched by handler_a again";
+ LOG(FATAL) << "Last assert must be caught by handler_a again";
}
// Test that defining an operator<< for a type in a namespace doesn't prevent
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698