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

Unified 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, 1 month 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 side-by-side diff with in-line comments
Download patch
« src/base/logging.h ('K') | « src/base/logging.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/base/logging-unittest.cc
diff --git a/test/unittests/base/logging-unittest.cc b/test/unittests/base/logging-unittest.cc
index 918feb114bbbfdebd508600188acbcf38b7eff10..d79e59ee06e54504e00508f3cfdb6527fd52fa4c 100644
--- a/test/unittests/base/logging-unittest.cc
+++ b/test/unittests/base/logging-unittest.cc
@@ -8,11 +8,18 @@
namespace v8 {
namespace base {
+namespace {
+template <typename Lhs, typename Rhs>
+std::string *CallCheckEQ(Lhs lhs, Rhs rhs, const char *msg) {
+ return CheckEQImpl<Lhs, Rhs>(lhs, rhs, msg);
+}
+} // namespace
+
TEST(LoggingTest, CheckEQImpl) {
- EXPECT_EQ(nullptr, CheckEQImpl(0.0, 0.0, ""));
- EXPECT_EQ(nullptr, CheckEQImpl(0.0, -0.0, ""));
- EXPECT_EQ(nullptr, CheckEQImpl(-0.0, 0.0, ""));
- EXPECT_EQ(nullptr, CheckEQImpl(-0.0, -0.0, ""));
+ EXPECT_EQ(nullptr, CallCheckEQ(0.0, 0.0, ""));
+ EXPECT_EQ(nullptr, CallCheckEQ(0.0, -0.0, ""));
+ EXPECT_EQ(nullptr, CallCheckEQ(-0.0, 0.0, ""));
+ EXPECT_EQ(nullptr, CallCheckEQ(-0.0, -0.0, ""));
}
} // namespace base
« 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