| 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/point3_f.h" | 9 #include "ui/gfx/geometry/point3_f.h" |
| 8 | 10 |
| 9 namespace gfx { | 11 namespace gfx { |
| 10 | 12 |
| 11 TEST(Point3Test, VectorArithmetic) { | 13 TEST(Point3Test, VectorArithmetic) { |
| 12 gfx::Point3F a(1.6f, 5.1f, 3.2f); | 14 gfx::Point3F a(1.6f, 5.1f, 3.2f); |
| 13 gfx::Vector3dF v1(3.1f, -3.2f, 9.3f); | 15 gfx::Vector3dF v1(3.1f, -3.2f, 9.3f); |
| 14 gfx::Vector3dF v2(-8.1f, 1.2f, 3.3f); | 16 gfx::Vector3dF v2(-8.1f, 1.2f, 3.3f); |
| 15 | 17 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 zero.Scale(6.f, 3.f, 1.5f); | 62 zero.Scale(6.f, 3.f, 1.5f); |
| 61 EXPECT_EQ(Point3F().ToString(), zero.ToString()); | 63 EXPECT_EQ(Point3F().ToString(), zero.ToString()); |
| 62 | 64 |
| 63 Point3F point(1.f, -1.f, 2.f); | 65 Point3F point(1.f, -1.f, 2.f); |
| 64 point.Scale(2.f); | 66 point.Scale(2.f); |
| 65 point.Scale(6.f, 3.f, 1.5f); | 67 point.Scale(6.f, 3.f, 1.5f); |
| 66 EXPECT_EQ(Point3F(12.f, -6.f, 6.f).ToString(), point.ToString()); | 68 EXPECT_EQ(Point3F(12.f, -6.f, 6.f).ToString(), point.ToString()); |
| 67 } | 69 } |
| 68 | 70 |
| 69 } // namespace gfx | 71 } // namespace gfx |
| OLD | NEW |