comctl32/tests: Use EqualRect() instead of open coding it.

Michael Stefaniuc mstefani at redhat.de
Mon Jun 6 04:14:05 CDT 2016


Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
---
 dlls/comctl32/tests/rebar.c   | 4 ++--
 dlls/comctl32/tests/toolbar.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/comctl32/tests/rebar.c b/dlls/comctl32/tests/rebar.c
index a016298..0c3e2dd 100644
--- a/dlls/comctl32/tests/rebar.c
+++ b/dlls/comctl32/tests/rebar.c
@@ -35,8 +35,8 @@ static HWND hMainWnd;
 static int system_font_height;
 
 
-#define check_rect(name, val, exp) ok(val.top == exp.top && val.bottom == exp.bottom && \
-    val.left == exp.left && val.right == exp.right, "invalid rect (" name ") (%d,%d) (%d,%d) - expected (%d,%d) (%d,%d)\n", \
+#define check_rect(name, val, exp) ok(EqualRect(&val, &exp), \
+    "invalid rect (" name ") (%d,%d) (%d,%d) - expected (%d,%d) (%d,%d)\n", \
     val.left, val.top, val.right, val.bottom, exp.left, exp.top, exp.right, exp.bottom);
 
 #define check_rect_no_top(name, val, exp) { \
diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c
index e8521b3..29b1b22 100644
--- a/dlls/comctl32/tests/toolbar.c
+++ b/dlls/comctl32/tests/toolbar.c
@@ -108,8 +108,8 @@ static const struct message restore_parent_seq[] = {
 
 #define expect(EXPECTED,GOT) ok((GOT)==(EXPECTED), "Expected %d, got %d\n", (EXPECTED), (GOT))
 
-#define check_rect(name, val, exp, ...) ok(val.top == exp.top && val.bottom == exp.bottom && \
-    val.left == exp.left && val.right == exp.right, "invalid rect (%d,%d) (%d,%d) - expected (%d,%d) (%d,%d) - (" name ")\n", \
+#define check_rect(name, val, exp, ...) ok(EqualRect(&val, &exp), \
+    "invalid rect (%d,%d) (%d,%d) - expected (%d,%d) (%d,%d) - (" name ")\n", \
     val.left, val.top, val.right, val.bottom, exp.left, exp.top, exp.right, exp.bottom, __VA_ARGS__);
  
 #define compare(val, exp, format) ok((val) == (exp), #val " value " format " expected " format "\n", (val), (exp));
-- 
2.4.11



More information about the wine-patches mailing list