Nikolay Sivov : comctl32/monthcal: Fix locale dependent test failure.

Alexandre Julliard julliard at winehq.org
Tue Sep 29 11:09:10 CDT 2009


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

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Tue Sep 29 14:14:37 2009 +0400

comctl32/monthcal: Fix locale dependent test failure.

---

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

diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c
index 5c5a8f8..268c25a 100644
--- a/dlls/comctl32/tests/monthcal.c
+++ b/dlls/comctl32/tests/monthcal.c
@@ -768,7 +768,7 @@ static void test_monthcal_currdate(void)
 static void test_monthcal_firstDay(void)
 {
     int res, fday, i, prev;
-    TCHAR b[128];
+    CHAR b[128];
     LCID lcid = LOCALE_USER_DEFAULT;
     HWND hwnd;
 
@@ -778,7 +778,7 @@ static void test_monthcal_firstDay(void)
 
     /* Setter and Getters for first day of week */
     /* check for locale first day */
-    if(GetLocaleInfo(lcid, LOCALE_IFIRSTDAYOFWEEK, b, 128)){
+    if(GetLocaleInfoA(lcid, LOCALE_IFIRSTDAYOFWEEK, b, 128)){
         fday = atoi(b);
         trace("fday: %d\n", fday);
         res = SendMessage(hwnd, MCM_GETFIRSTDAYOFWEEK, 0, 0);
@@ -1267,6 +1267,9 @@ static void test_monthcal_monthrange(void)
     res = SendMessage(hwnd, MCM_SETCURSEL, 0, (LPARAM)&st);
     expect(1,res);
 
+    /* to be locale independent */
+    SendMessage(hwnd, MCM_SETFIRSTDAYOFWEEK, 0, (LPARAM)6);
+
     flush_sequences(sequences, NUM_MSG_SEQUENCES);
 
     res = SendMessage(hwnd, MCM_GETMONTHRANGE, GMR_VISIBLE, (LPARAM)st_visible);




More information about the wine-cvs mailing list