comctl32/tests: Use EqualRect() instead of memcmp() to compare RECTs. (2nd try)
Michael Stefaniuc
mstefani at redhat.de
Mon Jun 20 06:42:15 CDT 2016
Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
---
Thou shalt not keep 5 year old unsubmitted patches around!
dlls/comctl32/tests/listview.c | 2 +-
dlls/comctl32/tests/toolbar.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index ed5d9f9..1444a9f 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -908,7 +908,7 @@ static void test_images(void)
r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM) &r2);
expect(1, r);
- ok(!memcmp(&r1, &r2, sizeof r1), "rectangle should be the same\n");
+ ok(EqualRect(&r1, &r2), "rectangle should be the same\n");
DestroyWindow(hwnd);
}
diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c
index d825e18..efad00a 100644
--- a/dlls/comctl32/tests/toolbar.c
+++ b/dlls/comctl32/tests/toolbar.c
@@ -1232,7 +1232,7 @@ static DWORD tbsize_alt_numtests = 0;
for (i=0; i<min(buttonCount, res->nButtons); i++) { \
ok(SendMessageA(hToolbar, TB_GETITEMRECT, i, (LPARAM)&rc) == 1, "TB_GETITEMRECT\n"); \
if (broken(tbsize_alt_numtests < sizeof(tbsize_alt_results)/sizeof(tbsize_alt_results[0]) && \
- memcmp(&rc, &tbsize_alt_results[tbsize_alt_numtests].rcButton, sizeof(RECT)) == 0)) { \
+ EqualRect(&rc, &tbsize_alt_results[tbsize_alt_numtests].rcButton))) { \
win_skip("Alternate rect found\n"); \
tbsize_alt_numtests++; \
} else if (!(mask&1)) { \
--
2.4.11
More information about the wine-patches
mailing list