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

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

Issue 1543183002: Switch to standard integer types in ui/gfx/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « ui/gfx/geometry/vector2d.cc ('k') | ui/gfx/geometry/vector3d_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h>
6
5 #include <cmath> 7 #include <cmath>
6 #include <limits> 8 #include <limits>
7 9
8 #include "base/basictypes.h" 10 #include "base/macros.h"
9 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/gfx/geometry/vector2d.h" 12 #include "ui/gfx/geometry/vector2d.h"
11 #include "ui/gfx/geometry/vector2d_f.h" 13 #include "ui/gfx/geometry/vector2d_f.h"
12 14
13 namespace gfx { 15 namespace gfx {
14 16
15 TEST(Vector2dTest, ConversionToFloat) { 17 TEST(Vector2dTest, ConversionToFloat) {
16 Vector2d i(3, 4); 18 Vector2d i(3, 4);
17 Vector2dF f = i; 19 Vector2dF f = i;
18 EXPECT_EQ(i, f); 20 EXPECT_EQ(i, f);
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 EXPECT_EQ(Vector2dF(8.5f, 10.5f).ToString(), a.ToString()); 243 EXPECT_EQ(Vector2dF(8.5f, 10.5f).ToString(), a.ToString());
242 a.SetToMin(Vector2dF(11.5f, 9.5f)); 244 a.SetToMin(Vector2dF(11.5f, 9.5f));
243 EXPECT_EQ(Vector2dF(8.5f, 9.5f).ToString(), a.ToString()); 245 EXPECT_EQ(Vector2dF(8.5f, 9.5f).ToString(), a.ToString());
244 a.SetToMin(Vector2dF(7.5f, 11.5f)); 246 a.SetToMin(Vector2dF(7.5f, 11.5f));
245 EXPECT_EQ(Vector2dF(7.5f, 9.5f).ToString(), a.ToString()); 247 EXPECT_EQ(Vector2dF(7.5f, 9.5f).ToString(), a.ToString());
246 a.SetToMin(Vector2dF(3.5f, 5.5f)); 248 a.SetToMin(Vector2dF(3.5f, 5.5f));
247 EXPECT_EQ(Vector2dF(3.5f, 5.5f).ToString(), a.ToString()); 249 EXPECT_EQ(Vector2dF(3.5f, 5.5f).ToString(), a.ToString());
248 } 250 }
249 251
250 } // namespace gfx 252 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/geometry/vector2d.cc ('k') | ui/gfx/geometry/vector3d_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698