summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorjeffbailey@chromium.org <jeffbailey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-02 21:13:21 +0000
committerjeffbailey@chromium.org <jeffbailey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-02 21:13:21 +0000
commit998e6d91635700a930df814eacd4bcb9322ccb9f (patch)
treeaa298bf3774b9fee11eb17ba465c4eb20f40cd9c /base
parent0378bb1bfcba343e03b04f3220a641cd12104d7b (diff)
downloadchromium_src-998e6d91635700a930df814eacd4bcb9322ccb9f.zip
chromium_src-998e6d91635700a930df814eacd4bcb9322ccb9f.tar.gz
chromium_src-998e6d91635700a930df814eacd4bcb9322ccb9f.tar.bz2
As of g++-4.5, the first argument to EXPECT_EQ cannot be
a constant expression. Credit: Jeffrey Yasskin, Google. Review URL: http://codereview.chromium.org/6691021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80270 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/logging_unittest.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/base/logging_unittest.cc b/base/logging_unittest.cc
index bb6e3d1..5a2cb53 100644
--- a/base/logging_unittest.cc
+++ b/base/logging_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -62,7 +62,10 @@ TEST_F(LoggingTest, BasicLogging) {
SetMinLogLevel(LOG_INFO);
EXPECT_TRUE(LOG_IS_ON(INFO));
- EXPECT_EQ(DEBUG_MODE != 0, DLOG_IS_ON(INFO));
+ // 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(VLOG_IS_ON(0));
LOG(INFO) << mock_log_source.Log();