OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 11 matching lines...) Expand all Loading... |
22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 */ | 23 */ |
24 | 24 |
25 #include "config.h" | 25 #include "config.h" |
26 #include "platform/geometry/FloatBox.h" | 26 #include "platform/geometry/FloatBox.h" |
27 | 27 |
28 #include "platform/geometry/FloatBoxTestHelpers.h" | 28 #include "platform/geometry/FloatBoxTestHelpers.h" |
29 | 29 |
30 #include <gtest/gtest.h> | 30 #include <gtest/gtest.h> |
31 | 31 |
32 using namespace WebCore; | 32 using namespace blink; |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
36 TEST(FloatBoxTest, SimpleCreationTest) | 36 TEST(FloatBoxTest, SimpleCreationTest) |
37 { | 37 { |
38 FloatBox box(1, 2, 3, 4, 5, 6); | 38 FloatBox box(1, 2, 3, 4, 5, 6); |
39 EXPECT_EQ(1, box.x()); | 39 EXPECT_EQ(1, box.x()); |
40 EXPECT_EQ(2, box.y()); | 40 EXPECT_EQ(2, box.y()); |
41 EXPECT_EQ(3, box.z()); | 41 EXPECT_EQ(3, box.z()); |
42 EXPECT_EQ(4, box.width()); | 42 EXPECT_EQ(4, box.width()); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 { | 112 { |
113 FloatBox box; | 113 FloatBox box; |
114 EXPECT_TRUE(box.isEmpty()); | 114 EXPECT_TRUE(box.isEmpty()); |
115 box.expandTo(FloatPoint3D(1, 0, 0)); | 115 box.expandTo(FloatPoint3D(1, 0, 0)); |
116 EXPECT_TRUE(box.isEmpty()); | 116 EXPECT_TRUE(box.isEmpty()); |
117 box.expandTo(FloatPoint3D(0, 1, 0)); | 117 box.expandTo(FloatPoint3D(0, 1, 0)); |
118 EXPECT_FALSE(box.isEmpty()); | 118 EXPECT_FALSE(box.isEmpty()); |
119 } | 119 } |
120 | 120 |
121 } | 121 } |
OLD | NEW |