Index: base/logging_unittest.cc |
diff --git a/base/logging_unittest.cc b/base/logging_unittest.cc |
index 7254265b177f5e7df4db8af969c133e7c2645424..8a20c54fb4c605734bf45c4b8bb582a76276e104 100644 |
--- a/base/logging_unittest.cc |
+++ b/base/logging_unittest.cc |
@@ -251,6 +251,13 @@ TEST_F(LoggingTest, Dcheck) { |
DCHECK_NE(p_not_null, nullptr); |
DCHECK_NE(nullptr, p_not_null); |
EXPECT_EQ(0, log_sink_call_count); |
+ |
+ // Test DCHECK on a scoped enum. |
+ enum class Animal { DOG, CAT }; |
+ DCHECK_EQ(Animal::DOG, Animal::DOG); |
+ EXPECT_EQ(0, log_sink_call_count); |
+ DCHECK_EQ(Animal::DOG, Animal::CAT); |
+ EXPECT_EQ(DCHECK_IS_ON() ? 1 : 0, log_sink_call_count); |
} |
TEST_F(LoggingTest, DcheckReleaseBehavior) { |