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

Unified Diff: base/logging_unittest.cc

Issue 1885933002: Ensure that DLOG(FATAL) also asserts in release-with-asserts builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment with installer fix Created 4 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 | « base/logging.h ('k') | base/message_loop/incoming_task_queue.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 22fb855b62afea792fb1708b5948f79d8a1f2848..531af1a3b4a99d7c4fab2369c742ec9c8e54991c 100644
--- a/base/logging_unittest.cc
+++ b/base/logging_unittest.cc
@@ -191,7 +191,7 @@ TEST_F(LoggingTest, CheckStreamsAreLazy) {
#endif
TEST_F(LoggingTest, DebugLoggingReleaseBehavior) {
-#if !defined(NDEBUG)
+#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
int debug_only_variable = 1;
#endif
// These should avoid emitting references to |debug_only_variable|
@@ -226,7 +226,7 @@ TEST_F(LoggingTest, Dcheck) {
// Release build with real DCHECKS.
SetLogAssertHandler(&LogSink);
EXPECT_TRUE(DCHECK_IS_ON());
- EXPECT_FALSE(DLOG_IS_ON(DCHECK));
+ EXPECT_TRUE(DLOG_IS_ON(DCHECK));
#else
// Debug build.
SetLogAssertHandler(&LogSink);
« no previous file with comments | « base/logging.h ('k') | base/message_loop/incoming_task_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698