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

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

Issue 642343003: gfx: De-templatize the gfx::Point and gfx::PointF classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: inlines-point: rebase Created 6 years, 2 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/point_f.cc ('k') | ui/gfx/gfx.gyp » ('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 "base/basictypes.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "ui/gfx/geometry/point.h" 7 #include "ui/gfx/geometry/point.h"
8 #include "ui/gfx/geometry/point_base.h"
9 #include "ui/gfx/geometry/point_conversions.h" 8 #include "ui/gfx/geometry/point_conversions.h"
10 #include "ui/gfx/geometry/point_f.h" 9 #include "ui/gfx/geometry/point_f.h"
11 10
12 namespace gfx { 11 namespace gfx {
13 12
14 namespace { 13 namespace {
15 14
16 int TestPointF(const PointF& p) { 15 int TestPointF(const PointF& p) {
17 return p.x(); 16 return p.x();
18 } 17 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 EXPECT_EQ(PointF(8.5f, 10.5f).ToString(), a.ToString()); 163 EXPECT_EQ(PointF(8.5f, 10.5f).ToString(), a.ToString());
165 a.SetToMin(PointF(11.5f, 9.5f)); 164 a.SetToMin(PointF(11.5f, 9.5f));
166 EXPECT_EQ(PointF(8.5f, 9.5f).ToString(), a.ToString()); 165 EXPECT_EQ(PointF(8.5f, 9.5f).ToString(), a.ToString());
167 a.SetToMin(PointF(7.5f, 11.5f)); 166 a.SetToMin(PointF(7.5f, 11.5f));
168 EXPECT_EQ(PointF(7.5f, 9.5f).ToString(), a.ToString()); 167 EXPECT_EQ(PointF(7.5f, 9.5f).ToString(), a.ToString());
169 a.SetToMin(PointF(3.5f, 5.5f)); 168 a.SetToMin(PointF(3.5f, 5.5f));
170 EXPECT_EQ(PointF(3.5f, 5.5f).ToString(), a.ToString()); 169 EXPECT_EQ(PointF(3.5f, 5.5f).ToString(), a.ToString());
171 } 170 }
172 171
173 } // namespace gfx 172 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/geometry/point_f.cc ('k') | ui/gfx/gfx.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698