summaryrefslogtreecommitdiffstats
path: root/base/logging_unittest.cc
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-09 05:37:22 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-09 05:37:22 +0000
commit91ac35e636e7d9567282440859a2a63573aac1ab (patch)
treeb6870cbe82bb199c0758dc230ad1372aeaa29900 /base/logging_unittest.cc
parent0dbdb7cf6b3263cfcd5fdcf95c6730d6672176f4 (diff)
downloadchromium_src-91ac35e636e7d9567282440859a2a63573aac1ab.zip
chromium_src-91ac35e636e7d9567282440859a2a63573aac1ab.tar.gz
chromium_src-91ac35e636e7d9567282440859a2a63573aac1ab.tar.bz2
Try to fix build more after r234081 / r234112.
It looks like logging.h _always_ defines LOGGING_IS_OFFICIAL_BUILD, it's just defined to 0 or 1. So check for the value of LOGGING_IS_OFFICIAL_BUILD instead of its definedness. BUG=315884 TBR=akalin@chromium.org Review URL: https://codereview.chromium.org/66213008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234115 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/logging_unittest.cc')
-rw-r--r--base/logging_unittest.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/base/logging_unittest.cc b/base/logging_unittest.cc
index c681253..4996abc 100644
--- a/base/logging_unittest.cc
+++ b/base/logging_unittest.cc
@@ -17,11 +17,11 @@ using ::testing::Return;
// Needs to be global since log assert handlers can't maintain state.
int log_sink_call_count = 0;
-#if !defined(LOGGING_IS_OFFICIAL_BUILD)
+#if !LOGGING_IS_OFFICIAL_BUILD
void LogSink(const std::string& str) {
++log_sink_call_count;
}
-#endif // !defined(LOGGING_IS_OFFICIAL_BUILD)
+#endif // !LOGGING_IS_OFFICIAL_BUILD
// Class to make sure any manipulations we do to the min log level are
// contained (i.e., do not affect other unit tests).
@@ -169,7 +169,7 @@ TEST_F(LoggingTest, LoggingIsLazy) {
}
// Official builds have CHECKs directly call BreakDebugger.
-#if !defined(LOGGING_IS_OFFICIAL_BUILD)
+#if !LOGGING_IS_OFFICIAL_BUILD
TEST_F(LoggingTest, CheckStreamsAreLazy) {
MockLogSource mock_log_source, uncalled_mock_log_source;
@@ -204,8 +204,7 @@ TEST_F(LoggingTest, DebugLoggingReleaseBehavior) {
TEST_F(LoggingTest, DcheckStreamsAreLazy) {
MockLogSource mock_log_source;
EXPECT_CALL(mock_log_source, Log()).Times(0);
-#if !defined(LOGGING_IS_OFFICIAL_BUILD) && defined(NDEBUG) && \
- !defined(DCHECK_ALWAYS_ON)
+#if !LOGGING_IS_OFFICIAL_BUILD && defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
// Unofficial release build without dcheck enabled.
set_dcheck_state(DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
DCHECK(mock_log_source.Log()) << mock_log_source.Log();