| OLD | NEW |
| 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 "ui/gfx/geometry/cubic_bezier.h" | 5 #include "ui/gfx/animation/cubic_bezier.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace gfx { | 10 namespace gfx { |
| 11 namespace { | 11 namespace { |
| 12 | 12 |
| 13 TEST(CubicBezierTest, Basic) { | 13 TEST(CubicBezierTest, Basic) { |
| 14 CubicBezier function(0.25, 0.0, 0.75, 1.0); | 14 CubicBezier function(0.25, 0.0, 0.75, 1.0); |
| 15 | 15 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 EXPECT_NEAR(function.Slope(0.75), 1.13576, epsilon); | 159 EXPECT_NEAR(function.Slope(0.75), 1.13576, epsilon); |
| 160 EXPECT_NEAR(function.Slope(0.8), 1.03184, epsilon); | 160 EXPECT_NEAR(function.Slope(0.8), 1.03184, epsilon); |
| 161 EXPECT_NEAR(function.Slope(0.85), 0.89121, epsilon); | 161 EXPECT_NEAR(function.Slope(0.85), 0.89121, epsilon); |
| 162 EXPECT_NEAR(function.Slope(0.9), 0.69778, epsilon); | 162 EXPECT_NEAR(function.Slope(0.9), 0.69778, epsilon); |
| 163 EXPECT_NEAR(function.Slope(0.95), 0.42170, epsilon); | 163 EXPECT_NEAR(function.Slope(0.95), 0.42170, epsilon); |
| 164 EXPECT_NEAR(function.Slope(1), 0, epsilon); | 164 EXPECT_NEAR(function.Slope(1), 0, epsilon); |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace | 167 } // namespace |
| 168 } // namespace gfx | 168 } // namespace gfx |
| OLD | NEW |