Aric Stewart : mlang/tests: GetLastError may not be set if Japanese conversions fail with S_FAIL so do not require that to skip the Japanese tests .

Alexandre Julliard julliard at winehq.org
Wed Oct 1 14:09:47 CDT 2008


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

Author: Aric Stewart <aric at codeweavers.com>
Date:   Sun Sep 28 10:52:20 2008 -0500

mlang/tests: GetLastError may not be set if Japanese conversions fail with S_FAIL so do not require that to skip the Japanese tests.

---

 dlls/mlang/tests/mlang.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/dlls/mlang/tests/mlang.c b/dlls/mlang/tests/mlang.c
index f8a2ced..ab1e4dd 100644
--- a/dlls/mlang/tests/mlang.c
+++ b/dlls/mlang/tests/mlang.c
@@ -1197,9 +1197,8 @@ static void test_JapaneseConversion(void)
         destsz = 30;
         outlen = jis_jp[i][0];
         srcsz = unc_jp[i][0];
-        SetLastError(0xdeadbeef);
         hr = pConvertINetUnicodeToMultiByte(NULL, 50220, &unc_jp[i][1], &srcsz, output, &destsz);
-        if (hr == S_FALSE && GetLastError() == ERROR_INVALID_NAME)
+        if (hr == S_FALSE)
         {
             skip("Code page identifier 50220 is not supported\n");
             break;
@@ -1236,9 +1235,8 @@ static void test_JapaneseConversion(void)
         outlen = sjis_jp[i][0];
         srcsz = unc_jp[i][0];
 
-        SetLastError(0xdeadbeef);
         hr = pConvertINetUnicodeToMultiByte(NULL, 932, &unc_jp[i][1], &srcsz, output, &destsz);
-        if (hr == S_FALSE && GetLastError() == ERROR_INVALID_NAME)
+        if (hr == S_FALSE)
         {
             skip("Code page identifier 932 is not supported\n");
             break;
@@ -1265,9 +1263,8 @@ static void test_JapaneseConversion(void)
         outlen = euc_jp[i][0];
         srcsz = unc_jp[i][0];
 
-        SetLastError(0xdeadbeef);
         hr = pConvertINetUnicodeToMultiByte(NULL, 51932, &unc_jp[i][1], &srcsz, output, &destsz);
-        if (hr == S_FALSE && GetLastError() == ERROR_INVALID_NAME)
+        if (hr == S_FALSE)
         {
             skip("Code page identifier 51932 is not supported\n");
             break;
@@ -1291,9 +1288,8 @@ static void test_JapaneseConversion(void)
     i = 0;
     destsz = 30;
     srcsz = jis_jp[i][0];
-    SetLastError(0xdeadbeef);
     hr = pConvertINetMultiByteToUnicode(NULL, 50932, &jis_jp[i][1], &srcsz, outputW, &destsz);
-    if (hr == S_FALSE && GetLastError() == ERROR_INVALID_NAME)
+    if (hr == S_FALSE)
     {
         skip("Code page identifier 50932 is not supported\n");
         return;




More information about the wine-cvs mailing list