[PATCH 3/3] Fix some test failures

Paul Vriens Paul.Vriens.Wine at gmail.com
Thu Oct 1 05:24:37 CDT 2009


---
 dlls/comctl32/tests/monthcal.c |   39 +++++++--------------------------------
 1 files changed, 7 insertions(+), 32 deletions(-)

diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c
index 268c25a..d8c7ba9 100644
--- a/dlls/comctl32/tests/monthcal.c
+++ b/dlls/comctl32/tests/monthcal.c
@@ -216,9 +216,6 @@ static const struct message monthcal_hit_test_seq[] = {
     { MCM_HITTEST, sent|wparam, 0},
     { MCM_HITTEST, sent|wparam, 0},
     { MCM_HITTEST, sent|wparam, 0},
-    { MCM_HITTEST, sent|wparam, 0},
-    { MCM_HITTEST, sent|wparam, 0},
-    { MCM_HITTEST, sent|wparam, 0},
     { 0 }
 };
 
@@ -860,11 +857,15 @@ static void test_monthcal_hittest(void)
     } hittest_test_t;
 
     static const hittest_test_t title_hits[] = {
-        { MCHT_NOWHERE,      0 },
+        { MCHT_TITLE,        0 },
         { MCHT_TITLEBTNPREV, 0 },
+        { MCHT_TITLE,        0 },
         { MCHT_TITLEMONTH,   1 },
+        { MCHT_TITLE,        0 },
         { MCHT_TITLEYEAR,    1 },
+        { MCHT_TITLE,        0 },
         { MCHT_TITLEBTNNEXT, 0 },
+        { MCHT_TITLE,        0 },
         { MCHT_NOWHERE,      0 }
     };
 
@@ -983,33 +984,6 @@ static void test_monthcal_hittest(void)
     expect(MCHT_CALENDARDATE, res);
 #endif
 
-    /* in active area - background section of the title */
-    mchit.pt.x = 2 * r.right / 7;
-    mchit.pt.y = 2 * r.bottom / 19;
-    res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit);
-    expect(2 * r.right / 7, mchit.pt.x);
-    expect(2 * r.bottom / 19, mchit.pt.y);
-    expect(mchit.uHit, res);
-    expect_hex(MCHT_TITLEBK, res);
-
-    /* in active area - month section of the title */
-    mchit.pt.x = r.right / 2;
-    mchit.pt.y = 2 * r.bottom / 19;
-    res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit);
-    expect(r.right / 2, mchit.pt.x);
-    expect(2 * r.bottom / 19, mchit.pt.y);
-    expect(mchit.uHit, res);
-    expect_hex(MCHT_TITLE, res);
-
-    /* in active area - year section of the title */
-    mchit.pt.x = 3 * r.right / 4;
-    mchit.pt.y = 2 * r.bottom / 19;
-    res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit);
-    expect(3 * r.right / 4, mchit.pt.x);
-    expect(2 * r.bottom / 19, mchit.pt.y);
-    expect(mchit.uHit, res);
-    expect_hex(MCHT_TITLE, res);
-
     /* in active area - date from next month */
     mchit.pt.x = 11 * r.right / 14;
     mchit.pt.y = 16 * r.bottom / 19;
@@ -1055,6 +1029,7 @@ static void test_monthcal_hittest(void)
     mchit.pt.y = (5/2) * r.bottom / 19;
     title_index = 0;
     old_res = SendMessage(hwnd, MCM_HITTEST, 0, (LPARAM) & mchit);
+    expect_hex(MCHT_TITLE, old_res);
 
     for (x = 0; x < r.right; x++){
         mchit.pt.x = x;
@@ -1063,7 +1038,7 @@ static void test_monthcal_hittest(void)
         expect((5/2) * r.bottom / 19, mchit.pt.y);
         expect(mchit.uHit, res);
 
-        if (res != MCHT_TITLEBK && res != old_res) {
+        if (res != old_res) {
             title_index++;
             old_res = res;
 
-- 
1.6.2.5


--------------060007070006040608050209--



More information about the wine-patches mailing list