OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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" | |
6 #include "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
7 #include "ui/gfx/geometry/box_f.h" | 6 #include "ui/gfx/geometry/box_f.h" |
8 | 7 |
9 namespace gfx { | 8 namespace gfx { |
10 | 9 |
11 TEST(BoxTest, Constructors) { | 10 TEST(BoxTest, Constructors) { |
12 EXPECT_EQ(BoxF(0.f, 0.f, 0.f, 0.f, 0.f, 0.f).ToString(), | 11 EXPECT_EQ(BoxF(0.f, 0.f, 0.f, 0.f, 0.f, 0.f).ToString(), |
13 BoxF().ToString()); | 12 BoxF().ToString()); |
14 EXPECT_EQ(BoxF(0.f, 0.f, 0.f, -3.f, -5.f, -7.f).ToString(), | 13 EXPECT_EQ(BoxF(0.f, 0.f, 0.f, -3.f, -5.f, -7.f).ToString(), |
15 BoxF().ToString()); | 14 BoxF().ToString()); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 BoxF box2 = box1; | 166 BoxF box2 = box1; |
168 box2 += Vector3dF(0.f, 0.f, 0.f); | 167 box2 += Vector3dF(0.f, 0.f, 0.f); |
169 EXPECT_EQ(box1.ToString(), box2.ToString()); | 168 EXPECT_EQ(box1.ToString(), box2.ToString()); |
170 | 169 |
171 box2 += Vector3dF(1.f, -2.f, -4.f); | 170 box2 += Vector3dF(1.f, -2.f, -4.f); |
172 EXPECT_EQ(BoxF(3.f, 1.f, 0.f, 5.f, 6.f, 7.f).ToString(), | 171 EXPECT_EQ(BoxF(3.f, 1.f, 0.f, 5.f, 6.f, 7.f).ToString(), |
173 box2.ToString()); | 172 box2.ToString()); |
174 } | 173 } |
175 | 174 |
176 } // namespace gfx | 175 } // namespace gfx |
OLD | NEW |