OLD | NEW |
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 | |
18 TEST(LoggingTest, CheckEQImpl) { | 11 TEST(LoggingTest, CheckEQImpl) { |
19 EXPECT_EQ(nullptr, CallCheckEQ(0.0, 0.0, "")); | 12 EXPECT_EQ(nullptr, CheckEQImpl(0.0, 0.0, "")); |
20 EXPECT_EQ(nullptr, CallCheckEQ(0.0, -0.0, "")); | 13 EXPECT_EQ(nullptr, CheckEQImpl(0.0, -0.0, "")); |
21 EXPECT_EQ(nullptr, CallCheckEQ(-0.0, 0.0, "")); | 14 EXPECT_EQ(nullptr, CheckEQImpl(-0.0, 0.0, "")); |
22 EXPECT_EQ(nullptr, CallCheckEQ(-0.0, -0.0, "")); | 15 EXPECT_EQ(nullptr, CheckEQImpl(-0.0, -0.0, "")); |
23 } | 16 } |
24 | 17 |
25 } // namespace base | 18 } // namespace base |
26 } // namespace v8 | 19 } // namespace v8 |
OLD | NEW |