Index: cc/test/geometry_test_utils.h |
diff --git a/cc/test/geometry_test_utils.h b/cc/test/geometry_test_utils.h |
index 7877a64986b5e2d19583310decdc7672b943a0c2..52cb814d9a9b5a0dfbc25c389049359dc7210ceb 100644 |
--- a/cc/test/geometry_test_utils.h |
+++ b/cc/test/geometry_test_utils.h |
@@ -13,32 +13,38 @@ namespace WebKitTests { |
// These are macros instead of functions so that we get useful line numbers where a test failed. |
#define EXPECT_FLOAT_RECT_EQ(expected, actual) \ |
-{ \ |
+do { \ |
EXPECT_FLOAT_EQ((expected).x(), (actual).x()); \ |
EXPECT_FLOAT_EQ((expected).y(), (actual).y()); \ |
EXPECT_FLOAT_EQ((expected).width(), (actual).width()); \ |
EXPECT_FLOAT_EQ((expected).height(), (actual).height()); \ |
-} |
+} while (false) |
#define EXPECT_RECT_EQ(expected, actual) \ |
-{ \ |
+do { \ |
EXPECT_EQ((expected).x(), (actual).x()); \ |
EXPECT_EQ((expected).y(), (actual).y()); \ |
EXPECT_EQ((expected).width(), (actual).width()); \ |
EXPECT_EQ((expected).height(), (actual).height()); \ |
-} |
+} while (false) |
#define EXPECT_SIZE_EQ(expected, actual) \ |
-{ \ |
+do { \ |
EXPECT_EQ((expected).width(), (actual).width()); \ |
EXPECT_EQ((expected).height(), (actual).height()); \ |
-} |
+} while (false) |
#define EXPECT_POINT_EQ(expected, actual) \ |
-{ \ |
+do { \ |
EXPECT_EQ((expected).x(), (actual).x()); \ |
EXPECT_EQ((expected).y(), (actual).y()); \ |
-} |
+} while (false) |
+ |
+#define EXPECT_VECTOR_EQ(expected, actual) \ |
+do { \ |
+ EXPECT_EQ((expected).x(), (actual).x()); \ |
+ EXPECT_EQ((expected).y(), (actual).y()); \ |
+} while (false) |
// This is a function rather than a macro because when this is included as a macro |
// in bulk, it causes a significant slow-down in compilation time. This problem |