Index: base/logging_unittest.cc |
diff --git a/base/logging_unittest.cc b/base/logging_unittest.cc |
index 22fb855b62afea792fb1708b5948f79d8a1f2848..e8756f1fb82a056380a1992ea20899bcb32605fe 100644 |
--- a/base/logging_unittest.cc |
+++ b/base/logging_unittest.cc |
@@ -234,13 +234,19 @@ TEST_F(LoggingTest, Dcheck) { |
EXPECT_TRUE(DLOG_IS_ON(DCHECK)); |
#endif |
+#if defined(DCHECK_IS_DUMP_WITHOUT_CRASH) |
+ const bool kDCheckLogsOutput = false; |
+#else |
+ const bool kDCheckLogsOutput = DCHECK_IS_ON(); |
+#endif |
+ |
EXPECT_EQ(0, log_sink_call_count); |
DCHECK(false); |
- EXPECT_EQ(DCHECK_IS_ON() ? 1 : 0, log_sink_call_count); |
+ EXPECT_EQ(kDCheckLogsOutput ? 1 : 0, log_sink_call_count); |
DPCHECK(false); |
- EXPECT_EQ(DCHECK_IS_ON() ? 2 : 0, log_sink_call_count); |
+ EXPECT_EQ(kDCheckLogsOutput ? 2 : 0, log_sink_call_count); |
DCHECK_EQ(0, 1); |
- EXPECT_EQ(DCHECK_IS_ON() ? 3 : 0, log_sink_call_count); |
+ EXPECT_EQ(kDCheckLogsOutput ? 3 : 0, log_sink_call_count); |
} |
TEST_F(LoggingTest, DcheckReleaseBehavior) { |