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

Unified Diff: base/logging_unittest.cc

Issue 6070006: Made logging not look up --enable-dcheck from command line (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed more compile failures Created 9 years, 11 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.cc ('k') | base/test/test_suite.cc » ('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 4b7fdbcd46ad5db4cb640b55bbb96e25c2aa32bb..bb6e3d19e0cab3bfcf98e331db0fe194fb4aadac 100644
--- a/base/logging_unittest.cc
+++ b/base/logging_unittest.cc
@@ -197,7 +197,7 @@ TEST_F(LoggingTest, DcheckStreamsAreLazy) {
#if !defined(LOGGING_IS_OFFICIAL_BUILD) && defined(NDEBUG)
// Unofficial release build.
- logging::g_enable_dcheck = false;
+ g_dcheck_state = DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
DCHECK(mock_log_source.Log()) << mock_log_source.Log();
DPCHECK(mock_log_source.Log()) << mock_log_source.Log();
DCHECK_EQ(0, 0) << mock_log_source.Log();
@@ -213,13 +213,13 @@ TEST_F(LoggingTest, Dcheck) {
EXPECT_FALSE(DLOG_IS_ON(DCHECK));
#elif defined(NDEBUG)
// Unofficial release build.
- logging::g_enable_dcheck = true;
- logging::SetLogReportHandler(&LogSink);
+ g_dcheck_state = ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
+ SetLogReportHandler(&LogSink);
EXPECT_TRUE(DCHECK_IS_ON());
EXPECT_FALSE(DLOG_IS_ON(DCHECK));
#else
// Unofficial debug build.
- logging::SetLogAssertHandler(&LogSink);
+ SetLogAssertHandler(&LogSink);
EXPECT_TRUE(DCHECK_IS_ON());
EXPECT_TRUE(DLOG_IS_ON(DCHECK));
#endif // defined(LOGGING_IS_OFFICIAL_BUILD)
« no previous file with comments | « base/logging.cc ('k') | base/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698