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