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

Unified Diff: test/base-unittests/platform/time-unittest.cc

Issue 444933002: Use EXPECT_DOUBLE_EQ for floating point comparisons. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/base-unittests/platform/time-unittest.cc
diff --git a/test/base-unittests/platform/time-unittest.cc b/test/base-unittests/platform/time-unittest.cc
index 0eb6795f6613a85c8136518df7ad2b95166b5c9a..409323a8d6000f884fec36dadc9835064f2e4e79 100644
--- a/test/base-unittests/platform/time-unittest.cc
+++ b/test/base-unittests/platform/time-unittest.cc
@@ -31,10 +31,10 @@ TEST(TimeDelta, FromAndIn) {
EXPECT_EQ(static_cast<int>(13), TimeDelta::FromHours(13).InHours());
EXPECT_EQ(static_cast<int>(13), TimeDelta::FromMinutes(13).InMinutes());
EXPECT_EQ(static_cast<int64_t>(13), TimeDelta::FromSeconds(13).InSeconds());
- EXPECT_EQ(13.0, TimeDelta::FromSeconds(13).InSecondsF());
+ EXPECT_DOUBLE_EQ(13.0, TimeDelta::FromSeconds(13).InSecondsF());
EXPECT_EQ(static_cast<int64_t>(13),
TimeDelta::FromMilliseconds(13).InMilliseconds());
- EXPECT_EQ(13.0, TimeDelta::FromMilliseconds(13).InMillisecondsF());
+ EXPECT_DOUBLE_EQ(13.0, TimeDelta::FromMilliseconds(13).InMillisecondsF());
EXPECT_EQ(static_cast<int64_t>(13),
TimeDelta::FromMicroseconds(13).InMicroseconds());
}
@@ -54,7 +54,7 @@ TEST(TimeDelta, MachTimespec) {
TEST(Time, JsTime) {
Time t = Time::FromJsTime(700000.3);
- EXPECT_EQ(700000.3, t.ToJsTime());
+ EXPECT_DOUBLE_EQ(700000.3, t.ToJsTime());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698