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

Side by Side Diff: ui/gfx/geometry/vector3d_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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/vector3d_f.h" 10 #include "ui/gfx/geometry/vector3d_f.h"
11 11
12 namespace gfx { 12 namespace gfx {
13 13
14 TEST(Vector3dTest, IsZero) { 14 TEST(Vector3dTest, IsZero) {
15 gfx::Vector3dF float_zero(0, 0, 0); 15 gfx::Vector3dF float_zero(0, 0, 0);
16 gfx::Vector3dF float_nonzero(0.1f, -0.1f, 0.1f); 16 gfx::Vector3dF float_nonzero(0.1f, -0.1f, 0.1f);
17 17
18 EXPECT_TRUE(float_zero.IsZero()); 18 EXPECT_TRUE(float_zero.IsZero());
19 EXPECT_FALSE(float_nonzero.IsZero()); 19 EXPECT_FALSE(float_nonzero.IsZero());
20 } 20 }
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 EXPECT_EQ(Vector3dF(7.5f, 10.5f, 12.5f).ToString(), a.ToString()); 255 EXPECT_EQ(Vector3dF(7.5f, 10.5f, 12.5f).ToString(), a.ToString());
256 a.SetToMin(Vector3dF(9.5f, 9.5f, 13.5f)); 256 a.SetToMin(Vector3dF(9.5f, 9.5f, 13.5f));
257 EXPECT_EQ(Vector3dF(7.5f, 9.5f, 12.5f).ToString(), a.ToString()); 257 EXPECT_EQ(Vector3dF(7.5f, 9.5f, 12.5f).ToString(), a.ToString());
258 a.SetToMin(Vector3dF(9.5f, 11.5f, 11.5f)); 258 a.SetToMin(Vector3dF(9.5f, 11.5f, 11.5f));
259 EXPECT_EQ(Vector3dF(7.5f, 9.5f, 11.5f).ToString(), a.ToString()); 259 EXPECT_EQ(Vector3dF(7.5f, 9.5f, 11.5f).ToString(), a.ToString());
260 a.SetToMin(Vector3dF(3.5f, 5.5f, 7.5f)); 260 a.SetToMin(Vector3dF(3.5f, 5.5f, 7.5f));
261 EXPECT_EQ(Vector3dF(3.5f, 5.5f, 7.5f).ToString(), a.ToString()); 261 EXPECT_EQ(Vector3dF(3.5f, 5.5f, 7.5f).ToString(), a.ToString());
262 } 262 }
263 263
264 } // namespace gfx 264 } // namespace gfx
OLDNEW
« ui/aura/aura.gyp ('K') | « ui/gfx/geometry/vector3d_f.cc ('k') | ui/gfx/gfx.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698