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

Side by Side Diff: ui/gfx/geometry/matrix3_unittest.cc

Issue 109433013: Move geometric types to a separate, more lightweight target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years 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 | Annotate | Revision Log
OLDNEW
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" 8 #include "base/basictypes.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/gfx/matrix3_f.h" 10 #include "ui/gfx/geometry/matrix3_f.h"
11 11
12 namespace gfx { 12 namespace gfx {
13 namespace { 13 namespace {
14 14
15 TEST(Matrix3fTest, Constructors) { 15 TEST(Matrix3fTest, Constructors) {
16 Matrix3F zeros = Matrix3F::Zeros(); 16 Matrix3F zeros = Matrix3F::Zeros();
17 Matrix3F ones = Matrix3F::Ones(); 17 Matrix3F ones = Matrix3F::Ones();
18 Matrix3F identity = Matrix3F::Identity(); 18 Matrix3F identity = Matrix3F::Identity();
19 19
20 Matrix3F product_ones = Matrix3F::FromOuterProduct( 20 Matrix3F product_ones = Matrix3F::FromOuterProduct(
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 expected_eigv -= eigenvals; 139 expected_eigv -= eigenvals;
140 EXPECT_NEAR(0, expected_eigv.LengthSquared(), 0.00001f); 140 EXPECT_NEAR(0, expected_eigv.LengthSquared(), 0.00001f);
141 expected_eigenvectors.set(0.04926317f, -0.92135662f, -0.38558414f, 141 expected_eigenvectors.set(0.04926317f, -0.92135662f, -0.38558414f,
142 0.82134249f, 0.25703273f, -0.50924521f, 142 0.82134249f, 0.25703273f, -0.50924521f,
143 0.56830419f, -0.2916096f, 0.76941158f); 143 0.56830419f, -0.2916096f, 0.76941158f);
144 EXPECT_TRUE(expected_eigenvectors.IsNear(eigenvectors, 0.00001f)); 144 EXPECT_TRUE(expected_eigenvectors.IsNear(eigenvectors, 0.00001f));
145 } 145 }
146 146
147 } 147 }
148 } 148 }
OLDNEW
« ui/aura/aura.gyp ('K') | « ui/gfx/geometry/matrix3_f.cc ('k') | ui/gfx/geometry/point.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698