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

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

Issue 2524093002: [base] Pass scalar arguments by value in CHECK/DCHECK (Closed)
Patch Set: Remove unneeded const Created 4 years 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
« src/base/logging.h ('K') | « src/base/logging.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 namespace v8 { 8 namespace v8 {
9 namespace base { 9 namespace base {
10 10
11 namespace {
12 template <typename Lhs, typename Rhs>
13 std::string *CallCheckEQ(Lhs lhs, Rhs rhs, const char *msg) {
14 return CheckEQImpl<Lhs, Rhs>(lhs, rhs, msg);
15 }
16 } // namespace
17
11 TEST(LoggingTest, CheckEQImpl) { 18 TEST(LoggingTest, CheckEQImpl) {
12 EXPECT_EQ(nullptr, CheckEQImpl(0.0, 0.0, "")); 19 EXPECT_EQ(nullptr, CallCheckEQ(0.0, 0.0, ""));
13 EXPECT_EQ(nullptr, CheckEQImpl(0.0, -0.0, "")); 20 EXPECT_EQ(nullptr, CallCheckEQ(0.0, -0.0, ""));
14 EXPECT_EQ(nullptr, CheckEQImpl(-0.0, 0.0, "")); 21 EXPECT_EQ(nullptr, CallCheckEQ(-0.0, 0.0, ""));
15 EXPECT_EQ(nullptr, CheckEQImpl(-0.0, -0.0, "")); 22 EXPECT_EQ(nullptr, CallCheckEQ(-0.0, -0.0, ""));
16 } 23 }
17 24
18 } // namespace base 25 } // namespace base
19 } // namespace v8 26 } // namespace v8
OLDNEW
« src/base/logging.h ('K') | « src/base/logging.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698