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

Side by Side Diff: third_party/WebKit/Source/core/animation/InterpolableValueTest.cpp

Issue 2940933003: DO NOT SUBMIT results of new clang-format (Closed)
Patch Set: Created 3 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
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 "core/animation/InterpolableValue.h" 5 #include "core/animation/InterpolableValue.h"
6 6
7 #include <memory>
7 #include "core/animation/LegacyStyleInterpolation.h" 8 #include "core/animation/LegacyStyleInterpolation.h"
8 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
9 #include <memory>
10 10
11 namespace blink { 11 namespace blink {
12 12
13 namespace { 13 namespace {
14 14
15 class SampleInterpolation : public LegacyStyleInterpolation { 15 class SampleInterpolation : public LegacyStyleInterpolation {
16 public: 16 public:
17 static PassRefPtr<LegacyStyleInterpolation> Create( 17 static PassRefPtr<LegacyStyleInterpolation> Create(
18 std::unique_ptr<InterpolableValue> start, 18 std::unique_ptr<InterpolableValue> start,
19 std::unique_ptr<InterpolableValue> end) { 19 std::unique_ptr<InterpolableValue> end) {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 add_list->Set(0, InterpolableNumber::Create(1)); 137 add_list->Set(0, InterpolableNumber::Create(1));
138 add_list->Set(1, InterpolableNumber::Create(2)); 138 add_list->Set(1, InterpolableNumber::Create(2));
139 add_list->Set(2, InterpolableNumber::Create(3)); 139 add_list->Set(2, InterpolableNumber::Create(3));
140 ScaleAndAdd(*base_list, 2, *add_list); 140 ScaleAndAdd(*base_list, 2, *add_list);
141 EXPECT_FLOAT_EQ(11, ToInterpolableNumber(base_list->Get(0))->Value()); 141 EXPECT_FLOAT_EQ(11, ToInterpolableNumber(base_list->Get(0))->Value());
142 EXPECT_FLOAT_EQ(22, ToInterpolableNumber(base_list->Get(1))->Value()); 142 EXPECT_FLOAT_EQ(22, ToInterpolableNumber(base_list->Get(1))->Value());
143 EXPECT_FLOAT_EQ(33, ToInterpolableNumber(base_list->Get(2))->Value()); 143 EXPECT_FLOAT_EQ(33, ToInterpolableNumber(base_list->Get(2))->Value());
144 } 144 }
145 145
146 } // namespace blink 146 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698