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

Side by Side Diff: ui/gfx/geometry/point_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/point3_unittest.cc ('k') | ui/gfx/geometry/quad_f.h » ('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 "base/basictypes.h" 5 #include <stddef.h>
6
7 #include "base/macros.h"
6 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
7 #include "ui/gfx/geometry/point.h" 9 #include "ui/gfx/geometry/point.h"
8 #include "ui/gfx/geometry/point_conversions.h" 10 #include "ui/gfx/geometry/point_conversions.h"
9 #include "ui/gfx/geometry/point_f.h" 11 #include "ui/gfx/geometry/point_f.h"
10 12
11 namespace gfx { 13 namespace gfx {
12 14
13 TEST(PointTest, ToPointF) { 15 TEST(PointTest, ToPointF) {
14 // Check that explicit conversion from integer to float compiles. 16 // Check that explicit conversion from integer to float compiles.
15 Point a(10, 20); 17 Point a(10, 20);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 EXPECT_EQ(PointF(8.5f, 10.5f).ToString(), a.ToString()); 154 EXPECT_EQ(PointF(8.5f, 10.5f).ToString(), a.ToString());
153 a.SetToMin(PointF(11.5f, 9.5f)); 155 a.SetToMin(PointF(11.5f, 9.5f));
154 EXPECT_EQ(PointF(8.5f, 9.5f).ToString(), a.ToString()); 156 EXPECT_EQ(PointF(8.5f, 9.5f).ToString(), a.ToString());
155 a.SetToMin(PointF(7.5f, 11.5f)); 157 a.SetToMin(PointF(7.5f, 11.5f));
156 EXPECT_EQ(PointF(7.5f, 9.5f).ToString(), a.ToString()); 158 EXPECT_EQ(PointF(7.5f, 9.5f).ToString(), a.ToString());
157 a.SetToMin(PointF(3.5f, 5.5f)); 159 a.SetToMin(PointF(3.5f, 5.5f));
158 EXPECT_EQ(PointF(3.5f, 5.5f).ToString(), a.ToString()); 160 EXPECT_EQ(PointF(3.5f, 5.5f).ToString(), a.ToString());
159 } 161 }
160 162
161 } // namespace gfx 163 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/geometry/point3_unittest.cc ('k') | ui/gfx/geometry/quad_f.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698