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

Side by Side Diff: third_party/WebKit/Source/platform/transforms/RotationTest.cpp

Issue 2391003004: Fix common axes logic to detect negated axes as not common (Closed)
Patch Set: Update expectation Created 4 years, 2 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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698