Commit f862ed53 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Use EXPECT_DOUBLE_EQ for floating point comparisons.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/444933002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8727c637
...@@ -31,10 +31,10 @@ TEST(TimeDelta, FromAndIn) { ...@@ -31,10 +31,10 @@ TEST(TimeDelta, FromAndIn) {
EXPECT_EQ(static_cast<int>(13), TimeDelta::FromHours(13).InHours()); EXPECT_EQ(static_cast<int>(13), TimeDelta::FromHours(13).InHours());
EXPECT_EQ(static_cast<int>(13), TimeDelta::FromMinutes(13).InMinutes()); EXPECT_EQ(static_cast<int>(13), TimeDelta::FromMinutes(13).InMinutes());
EXPECT_EQ(static_cast<int64_t>(13), TimeDelta::FromSeconds(13).InSeconds()); 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), EXPECT_EQ(static_cast<int64_t>(13),
TimeDelta::FromMilliseconds(13).InMilliseconds()); 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), EXPECT_EQ(static_cast<int64_t>(13),
TimeDelta::FromMicroseconds(13).InMicroseconds()); TimeDelta::FromMicroseconds(13).InMicroseconds());
} }
...@@ -54,7 +54,7 @@ TEST(TimeDelta, MachTimespec) { ...@@ -54,7 +54,7 @@ TEST(TimeDelta, MachTimespec) {
TEST(Time, JsTime) { TEST(Time, JsTime) {
Time t = Time::FromJsTime(700000.3); Time t = Time::FromJsTime(700000.3);
EXPECT_EQ(700000.3, t.ToJsTime()); EXPECT_DOUBLE_EQ(700000.3, t.ToJsTime());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment