| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <cmath> | 5 #include <cmath> |
| 6 #include <limits> | 6 #include <limits> |
| 7 | 7 |
| 8 #include "base/basictypes.h" | |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "ui/gfx/geometry/matrix3_f.h" | 9 #include "ui/gfx/geometry/matrix3_f.h" |
| 11 | 10 |
| 12 namespace gfx { | 11 namespace gfx { |
| 13 namespace { | 12 namespace { |
| 14 | 13 |
| 15 TEST(Matrix3fTest, Constructors) { | 14 TEST(Matrix3fTest, Constructors) { |
| 16 Matrix3F zeros = Matrix3F::Zeros(); | 15 Matrix3F zeros = Matrix3F::Zeros(); |
| 17 Matrix3F ones = Matrix3F::Ones(); | 16 Matrix3F ones = Matrix3F::Ones(); |
| 18 Matrix3F identity = Matrix3F::Identity(); | 17 Matrix3F identity = Matrix3F::Identity(); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 expected_eigv -= eigenvals; | 138 expected_eigv -= eigenvals; |
| 140 EXPECT_NEAR(0, expected_eigv.LengthSquared(), 0.00001f); | 139 EXPECT_NEAR(0, expected_eigv.LengthSquared(), 0.00001f); |
| 141 expected_eigenvectors.set(0.04926317f, -0.92135662f, -0.38558414f, | 140 expected_eigenvectors.set(0.04926317f, -0.92135662f, -0.38558414f, |
| 142 0.82134249f, 0.25703273f, -0.50924521f, | 141 0.82134249f, 0.25703273f, -0.50924521f, |
| 143 0.56830419f, -0.2916096f, 0.76941158f); | 142 0.56830419f, -0.2916096f, 0.76941158f); |
| 144 EXPECT_TRUE(expected_eigenvectors.IsNear(eigenvectors, 0.00001f)); | 143 EXPECT_TRUE(expected_eigenvectors.IsNear(eigenvectors, 0.00001f)); |
| 145 } | 144 } |
| 146 | 145 |
| 147 } | 146 } |
| 148 } | 147 } |
| OLD | NEW |