Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3429)

Unified Diff: cc/test/geometry_test_utils.h

Issue 11367080: cc: Remove all remaining use of WebCore Rect/Point/Size types from the compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move ui/gfx changes to cc/geometry.h Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/test/geometry_test_utils.h
diff --git a/cc/test/geometry_test_utils.h b/cc/test/geometry_test_utils.h
index 9eaf52ada7c971d4aa1ef818d2e6a3261aeffc0e..56dd41cb2035d0adeadb40e0f7970fd3e7194c4d 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

Powered by Google App Engine
This is Rietveld 408576698