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

Unified Diff: base/logging_unittest.cc

Issue 1436403003: Make scoped enums output streamable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« base/logging.h ('K') | « base/logging.h ('k') | no next file » | 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 e0619425f7542804b0c4604aba51603f619ef3b8..8f941a92736c41a25b42484d05fadcffd8dced6e 100644
--- a/base/logging_unittest.cc
+++ b/base/logging_unittest.cc
@@ -258,6 +258,14 @@ TEST_F(LoggingTest, CheckEqStatements) {
CHECK_EQ(false, true); // Unreached.
}
+// Test that scoped enums can be used with CHECK_EQ.
+TEST_F(LoggingTest, ScopedEnum) {
+ enum class TestEnum {
+ Value,
+ };
+ CHECK_EQ(TestEnum::Value, TestEnum::Value);
+}
dcheng 2015/11/13 03:30:23 This is where no-compile tests would be really use
+
// Test that defining an operator<< for a type in a namespace doesn't prevent
// other code in that namespace from calling the operator<<(ostream, wstring)
// defined by logging.h. This can fail if operator<<(ostream, wstring) can't be
« base/logging.h ('K') | « base/logging.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698