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

Unified Diff: base/logging_unittest.cc

Issue 2731823002: Replace use of logging::DEBUG_MODE with DCHECK_IS_ON(). (Closed)
Patch Set: Created 3 years, 10 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 | « base/logging.h ('k') | components/sync/base/logging.h » ('j') | 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 52ba9880b36a3632ccd74277360ff6c6a7eb92f7..04f349cab63913d9fcb7f9c1a0c1643ad248488f 100644
--- a/base/logging_unittest.cc
+++ b/base/logging_unittest.cc
@@ -69,16 +69,14 @@ class MockLogSource {
TEST_F(LoggingTest, BasicLogging) {
MockLogSource mock_log_source;
- EXPECT_CALL(mock_log_source, Log()).Times(DEBUG_MODE ? 16 : 8).
- WillRepeatedly(Return("log message"));
+ EXPECT_CALL(mock_log_source, Log())
+ .Times(DCHECK_IS_ON() ? 16 : 8)
+ .WillRepeatedly(Return("log message"));
SetMinLogLevel(LOG_INFO);
EXPECT_TRUE(LOG_IS_ON(INFO));
- // As of g++-4.5, the first argument to EXPECT_EQ cannot be a
- // constant expression.
- const bool kIsDebugMode = (DEBUG_MODE != 0);
- EXPECT_TRUE(kIsDebugMode == DLOG_IS_ON(INFO));
+ EXPECT_TRUE((DCHECK_IS_ON() != 0) == DLOG_IS_ON(INFO));
EXPECT_TRUE(VLOG_IS_ON(0));
LOG(INFO) << mock_log_source.Log();
« no previous file with comments | « base/logging.h ('k') | components/sync/base/logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698