KERNEL/tests: test WideCharToMultiByte

Saulius Krasuckas saulius2 at ar.fi.lt
Wed Aug 17 02:07:02 CDT 2005


Log message:
        Saulius Krasuckas <saulius.krasuckas at ieee.org>
        Add a test for WideCharToMultiByte.


Index: dlls/kernel/tests/locale.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/tests/locale.c,v
retrieving revision 1.40
diff -p -u -r1.40 locale.c
--- dlls/kernel/tests/locale.c  28 Jul 2005 10:16:02 -0000      1.40
+++ dlls/kernel/tests/locale.c  17 Aug 2005 07:01:07 -0000
@@ -2172,6 +2172,19 @@ static void test_EnumTimeFormatsA(void)
     ok(!lstrcmpA(date_fmt_buf, buf), "expected \"%s\" got \"%s\"\n", date_fmt_buf, buf);
 }
 
+static void test_WideCharToMultiByte(void)
+{
+    int res;
+    DWORD GLE;
+
+    SetLastError(0);
+    res = WideCharToMultiByte(CP_ACP, 0, NULL, 0, NULL, 0, NULL, NULL);
+    GLE = GetLastError();
+    ok(!res && GLE == ERROR_INVALID_PARAMETER,
+        "WideCharToMultiByte returned %d with GLE=%d (expected 0 with ERROR_INVALID_PARAMETER)\n", 
+        res, GLE);
+}
+
 START_TEST(locale)
 {
   InitFunctionPointers();
@@ -2195,6 +2208,7 @@ START_TEST(locale)
   test_EnumLanguageGroupLocalesA();
   test_SetLocaleInfoA();
   test_EnumUILanguageA();
+  test_WideCharToMultiByte();
 
   /* this requires collation table patch to make it MS compatible */
   if (0) test_sorting();




More information about the wine-patches mailing list