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

Unified Diff: base/logging_unittest.cc

Issue 2831073002: Fix LoggingTest.NestedLogAssertHandlers in official build. (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 6ae965f7f0ff2436e57dbd4c018419f2a508d527..bd3d836688239e9e042d493e990d42d7c5fbd234 100644
--- a/base/logging_unittest.cc
+++ b/base/logging_unittest.cc
@@ -519,35 +519,32 @@ TEST_F(LoggingTest, NestedLogAssertHandlers) {
EXPECT_CALL(
handler_a,
HandleLogAssert(
- _, _,
- base::StringPiece(
- "Check failed: false. First assert must be catched by handler_a"),
+ _, _, base::StringPiece("First assert must be catched by handler_a"),
hans 2017/04/20 17:28:39 Since you're changing this anyway, s/catched/caugh
_));
EXPECT_CALL(
handler_b,
- HandleLogAssert(_, _,
- base::StringPiece("Check failed: false. Second assert "
- "must be catched by handler_b"),
- _));
+ HandleLogAssert(
+ _, _, base::StringPiece("Second assert must be catched by handler_b"),
+ _));
EXPECT_CALL(
handler_a,
- HandleLogAssert(_, _,
- base::StringPiece("Check failed: false. Last assert "
- "must be catched by handler_a again"),
- _));
+ HandleLogAssert(
+ _, _,
+ base::StringPiece("Last assert must be catched by handler_a again"),
+ _));
logging::ScopedLogAssertHandler scoped_handler_a(base::Bind(
&MockLogAssertHandler::HandleLogAssert, base::Unretained(&handler_a)));
- CHECK(false) << "First assert must be catched by handler_a";
+ LOG(FATAL) << "First assert must be catched by handler_a";
{
logging::ScopedLogAssertHandler scoped_handler_b(base::Bind(
&MockLogAssertHandler::HandleLogAssert, base::Unretained(&handler_b)));
- CHECK(false) << "Second assert must be catched by handler_b";
+ LOG(FATAL) << "Second assert must be catched by handler_b";
}
- CHECK(false) << "Last assert must be catched by handler_a again";
+ LOG(FATAL) << "Last assert must be catched 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