OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "platform/transforms/Rotation.h" | 5 #include "platform/transforms/Rotation.h" |
6 | 6 |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 EXPECT_TRUE(Rotation::getCommonAxis(Rotation(FloatPoint3D(1, 2, 3), 50), | 51 EXPECT_TRUE(Rotation::getCommonAxis(Rotation(FloatPoint3D(1, 2, 3), 50), |
52 Rotation(FloatPoint3D(2, 4, 6), 100), | 52 Rotation(FloatPoint3D(2, 4, 6), 100), |
53 axis, angleA, angleB)); | 53 axis, angleA, angleB)); |
54 EXPECT_EQ(FloatPoint3D(1, 2, 3), axis); | 54 EXPECT_EQ(FloatPoint3D(1, 2, 3), axis); |
55 EXPECT_EQ(50, angleA); | 55 EXPECT_EQ(50, angleA); |
56 EXPECT_EQ(100, angleB); | 56 EXPECT_EQ(100, angleB); |
57 | 57 |
58 EXPECT_FALSE(Rotation::getCommonAxis(Rotation(FloatPoint3D(1, 2, 3), 50), | 58 EXPECT_FALSE(Rotation::getCommonAxis(Rotation(FloatPoint3D(1, 2, 3), 50), |
59 Rotation(FloatPoint3D(3, 2, 1), 100), | 59 Rotation(FloatPoint3D(3, 2, 1), 100), |
60 axis, angleA, angleB)); | 60 axis, angleA, angleB)); |
| 61 |
| 62 EXPECT_FALSE(Rotation::getCommonAxis(Rotation(FloatPoint3D(1, 2, 3), 50), |
| 63 Rotation(FloatPoint3D(-1, -2, -3), 100), |
| 64 axis, angleA, angleB)); |
61 } | 65 } |
62 | 66 |
63 } // namespace blink | 67 } // namespace blink |
OLD | NEW |