OLD | NEW |
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 "ui/gfx/point_base.h" | |
6 | |
7 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "ui/gfx/point.h" | 7 #include "ui/gfx/geometry/point.h" |
10 #include "ui/gfx/point_conversions.h" | 8 #include "ui/gfx/geometry/point_base.h" |
11 #include "ui/gfx/point_f.h" | 9 #include "ui/gfx/geometry/point_conversions.h" |
| 10 #include "ui/gfx/geometry/point_f.h" |
12 | 11 |
13 namespace gfx { | 12 namespace gfx { |
14 | 13 |
15 namespace { | 14 namespace { |
16 | 15 |
17 int TestPointF(const PointF& p) { | 16 int TestPointF(const PointF& p) { |
18 return p.x(); | 17 return p.x(); |
19 } | 18 } |
20 | 19 |
21 } // namespace | 20 } // namespace |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 EXPECT_EQ(PointF(8.5f, 10.5f).ToString(), a.ToString()); | 164 EXPECT_EQ(PointF(8.5f, 10.5f).ToString(), a.ToString()); |
166 a.SetToMin(PointF(11.5f, 9.5f)); | 165 a.SetToMin(PointF(11.5f, 9.5f)); |
167 EXPECT_EQ(PointF(8.5f, 9.5f).ToString(), a.ToString()); | 166 EXPECT_EQ(PointF(8.5f, 9.5f).ToString(), a.ToString()); |
168 a.SetToMin(PointF(7.5f, 11.5f)); | 167 a.SetToMin(PointF(7.5f, 11.5f)); |
169 EXPECT_EQ(PointF(7.5f, 9.5f).ToString(), a.ToString()); | 168 EXPECT_EQ(PointF(7.5f, 9.5f).ToString(), a.ToString()); |
170 a.SetToMin(PointF(3.5f, 5.5f)); | 169 a.SetToMin(PointF(3.5f, 5.5f)); |
171 EXPECT_EQ(PointF(3.5f, 5.5f).ToString(), a.ToString()); | 170 EXPECT_EQ(PointF(3.5f, 5.5f).ToString(), a.ToString()); |
172 } | 171 } |
173 | 172 |
174 } // namespace gfx | 173 } // namespace gfx |
OLD | NEW |