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/quad_f.h" | 9 #include "ui/gfx/geometry/quad_f.h" |
8 #include "ui/gfx/geometry/rect_f.h" | 10 #include "ui/gfx/geometry/rect_f.h" |
9 | 11 |
10 namespace gfx { | 12 namespace gfx { |
11 | 13 |
12 TEST(QuadTest, Construction) { | 14 TEST(QuadTest, Construction) { |
13 // Verify constructors. | 15 // Verify constructors. |
14 PointF a(1, 1); | 16 PointF a(1, 1); |
15 PointF b(2, 1); | 17 PointF b(2, 1); |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 PointF c_scaled = ScalePoint(c, 1.5f); | 351 PointF c_scaled = ScalePoint(c, 1.5f); |
350 PointF d_scaled = ScalePoint(d, 1.5f); | 352 PointF d_scaled = ScalePoint(d, 1.5f); |
351 EXPECT_EQ(q1, QuadF(a_scaled, b_scaled, c_scaled, d_scaled)); | 353 EXPECT_EQ(q1, QuadF(a_scaled, b_scaled, c_scaled, d_scaled)); |
352 | 354 |
353 QuadF q2; | 355 QuadF q2; |
354 q2.Scale(1.5f); | 356 q2.Scale(1.5f); |
355 EXPECT_EQ(q2, q2); | 357 EXPECT_EQ(q2, q2); |
356 } | 358 } |
357 | 359 |
358 } // namespace gfx | 360 } // namespace gfx |
OLD | NEW |