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

Side by Side Diff: test/unittests/base/logging-unittest.cc

Issue 891693002: [base] Further improve the logging facility. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Android GCC Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « src/jsregexp.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/base/logging.h" 5 #include "src/base/logging.h"
6 #include "testing/gtest-support.h" 6 #include "testing/gtest-support.h"
7 7
8 #ifdef DEBUG
9 #define DISABLE_IN_RELEASE(Name) Name
10 #else
11 #define DISABLE_IN_RELEASE(Name) DISABLED_##Name
12 #endif
13
8 namespace v8 { 14 namespace v8 {
9 namespace base { 15 namespace base {
16 namespace logging {
17
18 TEST(LoggingDeathTest, DISABLE_IN_RELEASE(CheckFailureWithMessage)) {
19 ASSERT_DEATH_IF_SUPPORTED({ CHECK(false) << "This is a message"; },
20 "This is a message");
21 ASSERT_DEATH_IF_SUPPORTED({ CHECK_EQ(0, 1) << "This is stupid"; },
22 "This is stupid");
23 }
24
10 25
11 TEST(LoggingTest, CheckEQImpl) { 26 TEST(LoggingTest, CheckEQImpl) {
12 EXPECT_EQ(nullptr, CheckEQImpl(0.0, 0.0, "")); 27 EXPECT_EQ(nullptr, CheckEQImpl(0.0, 0.0, ""));
13 EXPECT_EQ(nullptr, CheckEQImpl(0.0, -0.0, "")); 28 EXPECT_EQ(nullptr, CheckEQImpl(0.0, -0.0, ""));
14 EXPECT_EQ(nullptr, CheckEQImpl(-0.0, 0.0, "")); 29 EXPECT_EQ(nullptr, CheckEQImpl(-0.0, 0.0, ""));
15 EXPECT_EQ(nullptr, CheckEQImpl(-0.0, -0.0, "")); 30 EXPECT_EQ(nullptr, CheckEQImpl(-0.0, -0.0, ""));
16 } 31 }
17 32
33 } // namespace logging
18 } // namespace base 34 } // namespace base
19 } // namespace v8 35 } // namespace v8
OLDNEW
« no previous file with comments | « src/jsregexp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698