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

Unified Diff: base/logging_unittest.cc

Issue 14019004: fix gcc 4.7 compilation errors in base_unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 | « no previous file | 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 760cc24bc3fcde295174c1fd968c0ba91ded4dad..10517a50f29d2734c882cf2cd31c82184c87d4a6 100644
--- a/base/logging_unittest.cc
+++ b/base/logging_unittest.cc
@@ -65,7 +65,7 @@ TEST_F(LoggingTest, BasicLogging) {
// As of g++-4.5, the first argument to EXPECT_EQ cannot be a
// constant expression.
const bool kIsDebugMode = (DEBUG_MODE != 0);
- EXPECT_EQ(kIsDebugMode, DLOG_IS_ON(INFO));
+ EXPECT_TRUE(kIsDebugMode == DLOG_IS_ON(INFO));
EXPECT_TRUE(VLOG_IS_ON(0));
LOG(INFO) << mock_log_source.Log();
@@ -120,7 +120,7 @@ TEST_F(LoggingTest, LogIsOn) {
EXPECT_FALSE(LOG_IS_ON(ERROR));
EXPECT_TRUE(LOG_IS_ON(ERROR_REPORT));
EXPECT_TRUE(LOG_IS_ON(FATAL));
- EXPECT_EQ(kDfatalIsFatal, LOG_IS_ON(DFATAL));
+ EXPECT_TRUE(kDfatalIsFatal == LOG_IS_ON(DFATAL));
// LOG_IS_ON(ERROR_REPORT) should always be true.
SetMinLogLevel(LOG_FATAL);
@@ -129,7 +129,7 @@ TEST_F(LoggingTest, LogIsOn) {
EXPECT_FALSE(LOG_IS_ON(ERROR));
EXPECT_TRUE(LOG_IS_ON(ERROR_REPORT));
EXPECT_TRUE(LOG_IS_ON(FATAL));
- EXPECT_EQ(kDfatalIsFatal, LOG_IS_ON(DFATAL));
+ EXPECT_TRUE(kDfatalIsFatal == LOG_IS_ON(DFATAL));
// So should LOG_IS_ON(FATAL).
SetMinLogLevel(LOG_FATAL + 1);
@@ -138,7 +138,7 @@ TEST_F(LoggingTest, LogIsOn) {
EXPECT_FALSE(LOG_IS_ON(ERROR));
EXPECT_TRUE(LOG_IS_ON(ERROR_REPORT));
EXPECT_TRUE(LOG_IS_ON(FATAL));
- EXPECT_EQ(kDfatalIsFatal, LOG_IS_ON(DFATAL));
+ EXPECT_TRUE(kDfatalIsFatal == LOG_IS_ON(DFATAL));
}
TEST_F(LoggingTest, LoggingIsLazy) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698