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

Side by Side Diff: Source/core/animation/animatable/AnimatableDoubleAndBoolTest.cpp

Issue 1164413003: Fix unit test style in core/{animation,css,fetch,frame,layout,style,timing}/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: anonymous Created 5 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/animation/animatable/AnimatableDoubleAndBool.h" 6 #include "core/animation/animatable/AnimatableDoubleAndBool.h"
7 7
8 #include <gtest/gtest.h> 8 #include <gtest/gtest.h>
9 9
10 using namespace blink; 10 namespace blink {
11
12 namespace {
13 11
14 TEST(AnimationAnimatableDoubleAndBoolTest, Create) 12 TEST(AnimationAnimatableDoubleAndBoolTest, Create)
15 { 13 {
16 EXPECT_TRUE(static_cast<bool>(AnimatableDoubleAndBool::create(30, false).get ())); 14 EXPECT_TRUE(static_cast<bool>(AnimatableDoubleAndBool::create(30, false).get ()));
17 EXPECT_TRUE(static_cast<bool>(AnimatableDoubleAndBool::create(270, true).get ())); 15 EXPECT_TRUE(static_cast<bool>(AnimatableDoubleAndBool::create(270, true).get ()));
18 } 16 }
19 17
20 TEST(AnimationAnimatableDoubleAndBoolTest, Equal) 18 TEST(AnimationAnimatableDoubleAndBoolTest, Equal)
21 { 19 {
22 EXPECT_TRUE(AnimatableDoubleAndBool::create(30, false)->equals(AnimatableDou bleAndBool::create(30, false).get())); 20 EXPECT_TRUE(AnimatableDoubleAndBool::create(30, false)->equals(AnimatableDou bleAndBool::create(30, false).get()));
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 EXPECT_EQ(10, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10. get(), to20.get(), 0.4).get())->toDouble()); 76 EXPECT_EQ(10, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10. get(), to20.get(), 0.4).get())->toDouble());
79 EXPECT_TRUE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.ge t(), to20.get(), 0.4).get())->flag()); 77 EXPECT_TRUE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.ge t(), to20.get(), 0.4).get())->flag());
80 78
81 EXPECT_FALSE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.g et(), to20.get(), 0.6).get())->flag()); 79 EXPECT_FALSE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.g et(), to20.get(), 0.6).get())->flag());
82 EXPECT_EQ(20, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10. get(), to20.get(), 0.6).get())->toDouble()); 80 EXPECT_EQ(20, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10. get(), to20.get(), 0.6).get())->toDouble());
83 EXPECT_EQ(20, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10. get(), to20.get(), 1).get())->toDouble()); 81 EXPECT_EQ(20, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10. get(), to20.get(), 1).get())->toDouble());
84 EXPECT_EQ(20, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10. get(), to20.get(), 1.5).get())->toDouble()); 82 EXPECT_EQ(20, toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10. get(), to20.get(), 1.5).get())->toDouble());
85 EXPECT_FALSE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.g et(), to20.get(), 1.5).get())->flag()); 83 EXPECT_FALSE(toAnimatableDoubleAndBool(AnimatableValue::interpolate(from10.g et(), to20.get(), 1.5).get())->flag());
86 } 84 }
87 85
88 } 86 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/animatable/AnimatableColorTest.cpp ('k') | Source/core/animation/animatable/AnimatableDoubleTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698