Michael Stefaniuc : comctl32/tests: Use SetRect() instead of open coding it.

Alexandre Julliard julliard at winehq.org
Wed Dec 5 15:49:00 CST 2018


Module: wine
Branch: master
Commit: f98f01b368eb7628591f96429b99b203886519df
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=f98f01b368eb7628591f96429b99b203886519df

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Tue Dec  4 20:19:51 2018 +0100

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

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/comctl32/tests/button.c   | 5 +----
 dlls/comctl32/tests/monthcal.c | 6 +++---
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/dlls/comctl32/tests/button.c b/dlls/comctl32/tests/button.c
index 81461de..09ec4a1 100644
--- a/dlls/comctl32/tests/button.c
+++ b/dlls/comctl32/tests/button.c
@@ -1366,10 +1366,7 @@ static void test_get_set_textmargin(void)
     BOOL ret;
     DWORD type;
 
-    margin_in.top = 1;
-    margin_in.left = 2;
-    margin_in.right = 3;
-    margin_in.bottom = 4;
+    SetRect(&margin_in, 2, 1, 3, 4);
     for (type = BS_PUSHBUTTON; type <= BS_DEFCOMMANDLINK; type++)
     {
         hwnd = create_button(type, NULL);
diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c
index 7c78540..11a637f 100644
--- a/dlls/comctl32/tests/monthcal.c
+++ b/dlls/comctl32/tests/monthcal.c
@@ -1798,7 +1798,7 @@ static void test_hittest_v6(void)
     mchit.iOffset = -1;
     mchit.iCol = mchit.iRow = -1;
     mchit.uHit = 0;
-    mchit.rc.left = mchit.rc.right = mchit.rc.top = mchit.rc.bottom = -1;
+    SetRect(&mchit.rc, -1, -1, -1, -1);
     ret = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect_hex(MCHT_CALENDARDATE, ret);
     expect_hex(MCHT_CALENDARDATE, mchit.uHit);
@@ -1815,7 +1815,7 @@ static void test_hittest_v6(void)
     mchit.iOffset = -1;
     mchit.iCol = mchit.iRow = -1;
     mchit.uHit = 0;
-    mchit.rc.left = mchit.rc.right = mchit.rc.top = mchit.rc.bottom = -1;
+    SetRect(&mchit.rc, -1, -1, -1, -1);
     ret = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     expect_hex(MCHT_TITLE, ret);
     expect_hex(MCHT_TITLE, mchit.uHit);
@@ -1834,7 +1834,7 @@ static void test_hittest_v6(void)
     mchit.iOffset = -2;
     mchit.iCol = mchit.iRow = -2;
     mchit.uHit = ~0;
-    mchit.rc.left = mchit.rc.right = mchit.rc.top = mchit.rc.bottom = -1;
+    SetRect(&mchit.rc, -1, -1, -1, -1);
     ret = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
     todo_wine expect_hex(MCHT_NOWHERE, ret);
     todo_wine expect_hex(MCHT_NOWHERE, mchit.uHit);




More information about the wine-cvs mailing list