summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authormmoss@chromium.org <mmoss@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-08 16:08:24 +0000
committermmoss@chromium.org <mmoss@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-08 16:08:24 +0000
commita3303b6274be0615823efc3ade57ace0c75a2cf5 (patch)
treef87329146debec32269e4e5db3d98367dbde96cc /ui
parente2173eeae269887a6c259bb17311ae3d3ef9fe79 (diff)
downloadchromium_src-a3303b6274be0615823efc3ade57ace0c75a2cf5.zip
chromium_src-a3303b6274be0615823efc3ade57ace0c75a2cf5.tar.gz
chromium_src-a3303b6274be0615823efc3ade57ace0c75a2cf5.tar.bz2
Use EXPECT_DOUBLE_EQ for floating point tests.
This fixes multiple test failures on the new Lucid bots, like: MultiAnimationTest.Basic: ui/base/animation/multi_animation_unittest.cc:32: Failure Value of: animation.GetCurrentValue() Actual: 0.36 Expected: Tween::CalculateValue(Tween::EASE_OUT, .2) Which is: 0.36 BUG= TEST=Fix printing_unittests, app_unittests, and gfx_unittests on new Lucid official builder. Review URL: http://codereview.chromium.org/6811036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80940 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/base/animation/multi_animation_unittest.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/base/animation/multi_animation_unittest.cc b/ui/base/animation/multi_animation_unittest.cc
index dfc015d..9e0c339 100644
--- a/ui/base/animation/multi_animation_unittest.cc
+++ b/ui/base/animation/multi_animation_unittest.cc
@@ -28,14 +28,14 @@ TEST_F(MultiAnimationTest, Basic) {
// Step to 120, which is 20% through the second part.
as_element->Step(base::TimeTicks() +
base::TimeDelta::FromMilliseconds(120));
- EXPECT_EQ(Tween::CalculateValue(Tween::EASE_OUT, .2),
- animation.GetCurrentValue());
+ EXPECT_DOUBLE_EQ(Tween::CalculateValue(Tween::EASE_OUT, .2),
+ animation.GetCurrentValue());
// Step to 320, which is 20% through the second part.
as_element->Step(base::TimeTicks() +
base::TimeDelta::FromMilliseconds(320));
- EXPECT_EQ(Tween::CalculateValue(Tween::EASE_OUT, .2),
- animation.GetCurrentValue());
+ EXPECT_DOUBLE_EQ(Tween::CalculateValue(Tween::EASE_OUT, .2),
+ animation.GetCurrentValue());
}
TEST_F(MultiAnimationTest, DifferingStartAndEnd) {