[COMCTL32_WINETEST] Sync with Wine Staging 4.0. CORE-15682
[reactos.git] / modules / rostests / winetests / comctl32 / monthcal.c
index 85822a3..11a637f 100644 (file)
@@ -1216,7 +1216,7 @@ if (0)
             } else {
                 title_index++;
 
-                if (sizeof(title_hits) / sizeof(title_hits[0]) <= title_index)
+                if (ARRAY_SIZE(title_hits) <= title_index)
                     break;
 
                 todo_wine_if(title_hits[title_index].todo)
@@ -1241,8 +1241,7 @@ if (0)
 
     todo_wine ok(month_count + year_count >= 1, "Not enough month and year items\n");
 
-    ok(r.right <= x && title_index + 1 == sizeof(title_hits) / sizeof(title_hits[0]),
-       "Wrong title layout\n");
+    ok(r.right <= x && title_index + 1 == ARRAY_SIZE(title_hits), "Wrong title layout\n");
 
     DestroyWindow(hwnd);
 }
@@ -1799,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);
@@ -1816,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);
@@ -1835,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);
@@ -2016,7 +2015,7 @@ static void test_sel_notify(void)
     };
     int i;
 
-    for(i = 0; i < sizeof styles / sizeof styles[0]; i++)
+    for(i = 0; i < ARRAY_SIZE(styles); i++)
     {
         hwnd = create_monthcal_control(styles[i].val);
         SetWindowLongPtrA(hwnd, GWLP_ID, SEL_NOTIFY_TEST_ID);