| Index: Source/core/animation/animatable/AnimatableDoubleAndBoolTest.cpp
|
| diff --git a/Source/core/animation/animatable/AnimatableDoubleAndBoolTest.cpp b/Source/core/animation/animatable/AnimatableDoubleAndBoolTest.cpp
|
| index b961164f55e223f009b33e4df88e7185f9f6a699..289fb404eecaed8b9fb3e24680c96a311b3a81c5 100644
|
| --- a/Source/core/animation/animatable/AnimatableDoubleAndBoolTest.cpp
|
| +++ b/Source/core/animation/animatable/AnimatableDoubleAndBoolTest.cpp
|
| @@ -11,17 +11,17 @@ namespace blink {
|
|
|
| TEST(AnimationAnimatableDoubleAndBoolTest, Create)
|
| {
|
| - EXPECT_TRUE(static_cast<bool>(AnimatableDoubleAndBool::create(30, false).get()));
|
| - EXPECT_TRUE(static_cast<bool>(AnimatableDoubleAndBool::create(270, true).get()));
|
| + EXPECT_TRUE(static_cast<bool>(AnimatableDoubleAndBool::create(30, false)));
|
| + EXPECT_TRUE(static_cast<bool>(AnimatableDoubleAndBool::create(270, true)));
|
| }
|
|
|
| TEST(AnimationAnimatableDoubleAndBoolTest, Equal)
|
| {
|
| - EXPECT_TRUE(AnimatableDoubleAndBool::create(30, false)->equals(AnimatableDoubleAndBool::create(30, false).get()));
|
| - EXPECT_TRUE(AnimatableDoubleAndBool::create(270, true)->equals(AnimatableDoubleAndBool::create(270, true).get()));
|
| - EXPECT_FALSE(AnimatableDoubleAndBool::create(30, false)->equals(AnimatableDoubleAndBool::create(270, true).get()));
|
| - EXPECT_FALSE(AnimatableDoubleAndBool::create(30, false)->equals(AnimatableDoubleAndBool::create(270, false).get()));
|
| - EXPECT_FALSE(AnimatableDoubleAndBool::create(30, false)->equals(AnimatableDoubleAndBool::create(30, true).get()));
|
| + EXPECT_TRUE(AnimatableDoubleAndBool::create(30, false)->equals(AnimatableDoubleAndBool::create(30, false)));
|
| + EXPECT_TRUE(AnimatableDoubleAndBool::create(270, true)->equals(AnimatableDoubleAndBool::create(270, true)));
|
| + EXPECT_FALSE(AnimatableDoubleAndBool::create(30, false)->equals(AnimatableDoubleAndBool::create(270, true)));
|
| + EXPECT_FALSE(AnimatableDoubleAndBool::create(30, false)->equals(AnimatableDoubleAndBool::create(270, false)));
|
| + EXPECT_FALSE(AnimatableDoubleAndBool::create(30, false)->equals(AnimatableDoubleAndBool::create(30, true)));
|
| }
|
|
|
| TEST(AnimationAnimatableDoubleAndBoolTest, ToDouble)
|
| @@ -38,49 +38,49 @@ TEST(AnimationAnimatableDoubleAndBoolTest, Flag)
|
|
|
| TEST(AnimationAnimatableDoubleAndBoolTest, InterpolateFalse)
|
| {
|
| - RefPtrWillBeRawPtr<AnimatableDoubleAndBool> from10 = AnimatableDoubleAndBool::create(10, false);
|
| - RefPtrWillBeRawPtr<AnimatableDoubleAndBool> to20 = AnimatableDoubleAndBool::create(20, false);
|
| - EXPECT_FALSE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), -0.5).get())->flag());
|
| - EXPECT_EQ(5, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), -0.5).get())->toDouble());
|
| - EXPECT_EQ(10, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 0).get())->toDouble());
|
| - EXPECT_EQ(14, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 0.4).get())->toDouble());
|
| - EXPECT_EQ(15, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 0.5).get())->toDouble());
|
| - EXPECT_EQ(16, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 0.6).get())->toDouble());
|
| - EXPECT_EQ(20, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 1).get())->toDouble());
|
| - EXPECT_EQ(25, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 1.5).get())->toDouble());
|
| - EXPECT_FALSE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 1.5).get())->flag());
|
| + AnimatableDoubleAndBool* from10 = AnimatableDoubleAndBool::create(10, false);
|
| + AnimatableDoubleAndBool* to20 = AnimatableDoubleAndBool::create(20, false);
|
| + EXPECT_FALSE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, -0.5))->flag());
|
| + EXPECT_EQ(5, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, -0.5))->toDouble());
|
| + EXPECT_EQ(10, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 0))->toDouble());
|
| + EXPECT_EQ(14, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 0.4))->toDouble());
|
| + EXPECT_EQ(15, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 0.5))->toDouble());
|
| + EXPECT_EQ(16, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 0.6))->toDouble());
|
| + EXPECT_EQ(20, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 1))->toDouble());
|
| + EXPECT_EQ(25, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 1.5))->toDouble());
|
| + EXPECT_FALSE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 1.5))->flag());
|
| }
|
|
|
| TEST(AnimationAnimatableDoubleAndBoolTest, InterpolateTrue)
|
| {
|
| - RefPtrWillBeRawPtr<AnimatableDoubleAndBool> from10 = AnimatableDoubleAndBool::create(10, true);
|
| - RefPtrWillBeRawPtr<AnimatableDoubleAndBool> to20 = AnimatableDoubleAndBool::create(20, true);
|
| - EXPECT_TRUE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), -0.5).get())->flag());
|
| - EXPECT_EQ(5, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), -0.5).get())->toDouble());
|
| - EXPECT_EQ(10, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 0).get())->toDouble());
|
| - EXPECT_EQ(14, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 0.4).get())->toDouble());
|
| - EXPECT_EQ(15, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 0.5).get())->toDouble());
|
| - EXPECT_EQ(16, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 0.6).get())->toDouble());
|
| - EXPECT_EQ(20, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 1).get())->toDouble());
|
| - EXPECT_EQ(25, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 1.5).get())->toDouble());
|
| - EXPECT_TRUE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 1.5).get())->flag());
|
| + AnimatableDoubleAndBool* from10 = AnimatableDoubleAndBool::create(10, true);
|
| + AnimatableDoubleAndBool* to20 = AnimatableDoubleAndBool::create(20, true);
|
| + EXPECT_TRUE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, -0.5))->flag());
|
| + EXPECT_EQ(5, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, -0.5))->toDouble());
|
| + EXPECT_EQ(10, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 0))->toDouble());
|
| + EXPECT_EQ(14, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 0.4))->toDouble());
|
| + EXPECT_EQ(15, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 0.5))->toDouble());
|
| + EXPECT_EQ(16, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 0.6))->toDouble());
|
| + EXPECT_EQ(20, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 1))->toDouble());
|
| + EXPECT_EQ(25, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 1.5))->toDouble());
|
| + EXPECT_TRUE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 1.5))->flag());
|
| }
|
|
|
| TEST(AnimationAnimatableDoubleAndBoolTest, Step)
|
| {
|
| - RefPtrWillBeRawPtr<AnimatableDoubleAndBool> from10 = AnimatableDoubleAndBool::create(10, true);
|
| - RefPtrWillBeRawPtr<AnimatableDoubleAndBool> to20 = AnimatableDoubleAndBool::create(20, false);
|
| - EXPECT_TRUE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), -0.5).get())->flag());
|
| - EXPECT_EQ(10, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), -0.5).get())->toDouble());
|
| - EXPECT_EQ(10, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 0).get())->toDouble());
|
| - EXPECT_EQ(10, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 0.4).get())->toDouble());
|
| - EXPECT_TRUE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 0.4).get())->flag());
|
| + AnimatableDoubleAndBool* from10 = AnimatableDoubleAndBool::create(10, true);
|
| + AnimatableDoubleAndBool* to20 = AnimatableDoubleAndBool::create(20, false);
|
| + EXPECT_TRUE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, -0.5))->flag());
|
| + EXPECT_EQ(10, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, -0.5))->toDouble());
|
| + EXPECT_EQ(10, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 0))->toDouble());
|
| + EXPECT_EQ(10, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 0.4))->toDouble());
|
| + EXPECT_TRUE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 0.4))->flag());
|
|
|
| - EXPECT_FALSE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 0.6).get())->flag());
|
| - EXPECT_EQ(20, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 0.6).get())->toDouble());
|
| - EXPECT_EQ(20, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 1).get())->toDouble());
|
| - EXPECT_EQ(20, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 1.5).get())->toDouble());
|
| - EXPECT_FALSE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.get(), to20.get(), 1.5).get())->flag());
|
| + EXPECT_FALSE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 0.6))->flag());
|
| + EXPECT_EQ(20, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 0.6))->toDouble());
|
| + EXPECT_EQ(20, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 1))->toDouble());
|
| + EXPECT_EQ(20, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 1.5))->toDouble());
|
| + EXPECT_FALSE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10, to20, 1.5))->flag());
|
| }
|
|
|
| } // namespace blink
|
|
|