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 "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 Loading... |
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 |
OLD | NEW |