| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 #ifndef CCGeometryTestUtils_h | 5 #ifndef CCGeometryTestUtils_h |
| 6 #define CCGeometryTestUtils_h | 6 #define CCGeometryTestUtils_h |
| 7 | 7 |
| 8 namespace WebKit { | 8 namespace WebKit { |
| 9 class WebTransformationMatrix; | 9 class WebTransformationMatrix; |
| 10 } | 10 } |
| 11 | 11 |
| 12 namespace WebKitTests { | 12 namespace WebKitTests { |
| 13 | 13 |
| 14 // These are macros instead of functions so that we get useful line numbers wher
e a test failed. | 14 // These are macros instead of functions so that we get useful line numbers wher
e a test failed. |
| 15 #define EXPECT_FLOAT_RECT_EQ(expected, actual) \ | 15 #define EXPECT_FLOAT_RECT_EQ(expected, actual) \ |
| 16 { \ | 16 { \ |
| 17 EXPECT_FLOAT_EQ((expected).location().x(), (actual).location().x()); \ | 17 EXPECT_FLOAT_EQ((expected).x(), (actual).x()); \ |
| 18 EXPECT_FLOAT_EQ((expected).location().y(), (actual).location().y()); \ | 18 EXPECT_FLOAT_EQ((expected).y(), (actual).y()); \ |
| 19 EXPECT_FLOAT_EQ((expected).size().width(), (actual).size().width()); \ | 19 EXPECT_FLOAT_EQ((expected).width(), (actual).width()); \ |
| 20 EXPECT_FLOAT_EQ((expected).size().height(), (actual).size().height()); \ | 20 EXPECT_FLOAT_EQ((expected).height(), (actual).height()); \ |
| 21 } | 21 } |
| 22 | 22 |
| 23 #define EXPECT_RECT_EQ(expected, actual) \ | 23 #define EXPECT_RECT_EQ(expected, actual) \ |
| 24 { \ | 24 { \ |
| 25 EXPECT_EQ((expected).location().x(), (actual).location().x()); \ | 25 EXPECT_EQ((expected).x(), (actual).x()); \ |
| 26 EXPECT_EQ((expected).location().y(), (actual).location().y()); \ | 26 EXPECT_EQ((expected).y(), (actual).y()); \ |
| 27 EXPECT_EQ((expected).size().width(), (actual).size().width()); \ | 27 EXPECT_EQ((expected).width(), (actual).width()); \ |
| 28 EXPECT_EQ((expected).size().height(), (actual).size().height()); \ | 28 EXPECT_EQ((expected).height(), (actual).height()); \ |
| 29 } | 29 } |
| 30 | 30 |
| 31 #define EXPECT_SIZE_EQ(expected, actual) \ | 31 #define EXPECT_SIZE_EQ(expected, actual) \ |
| 32 { \ | 32 { \ |
| 33 EXPECT_EQ((expected).width(), (actual).width()); \ | 33 EXPECT_EQ((expected).width(), (actual).width()); \ |
| 34 EXPECT_EQ((expected).height(), (actual).height()); \ | 34 EXPECT_EQ((expected).height(), (actual).height()); \ |
| 35 } | 35 } |
| 36 | 36 |
| 37 #define EXPECT_POINT_EQ(expected, actual) \ | 37 #define EXPECT_POINT_EQ(expected, actual) \ |
| 38 { \ | 38 { \ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 49 | 49 |
| 50 #define EXPECT_TRANSFORMATION_MATRIX_EQ(expected, actual) \ | 50 #define EXPECT_TRANSFORMATION_MATRIX_EQ(expected, actual) \ |
| 51 { \ | 51 { \ |
| 52 SCOPED_TRACE(""); \ | 52 SCOPED_TRACE(""); \ |
| 53 WebKitTests::ExpectTransformationMatrixEq(expected, actual); \ | 53 WebKitTests::ExpectTransformationMatrixEq(expected, actual); \ |
| 54 } | 54 } |
| 55 | 55 |
| 56 } // namespace WebKitTests | 56 } // namespace WebKitTests |
| 57 | 57 |
| 58 #endif // CCGeometryTestUtils_h | 58 #endif // CCGeometryTestUtils_h |
| OLD | NEW |