Juan Lang : crypt32: Remove a test that fails on some Windows 98 systems, and document it.

Alexandre Julliard julliard at winehq.org
Thu Feb 12 11:14:44 CST 2009


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

Author: Juan Lang <juan.lang at gmail.com>
Date:   Wed Feb 11 17:21:50 2009 -0800

crypt32: Remove a test that fails on some Windows 98 systems, and document it.

---

 dlls/crypt32/tests/sip.c |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/dlls/crypt32/tests/sip.c b/dlls/crypt32/tests/sip.c
index 7ffa2b9..1ef23b3 100644
--- a/dlls/crypt32/tests/sip.c
+++ b/dlls/crypt32/tests/sip.c
@@ -72,9 +72,14 @@ static void test_AddRemoveProvider(void)
     }
     else
     {
-        ok (!ret, "Expected CryptSIPRemoveProvider to fail.\n");
-        ok (GetLastError() == ERROR_FILE_NOT_FOUND,
-            "Expected ERROR_FILE_NOT_FOUND, got %d.\n", GetLastError());
+        /* On some Win98 systems, CryptSIPRemoveProvider always succeeds if
+         * the arguments are correct, whether or not the registry key is
+         * present, so don't test ret, just check the last error if it does
+         * return FALSE.
+         */
+        if (!ret)
+            ok (GetLastError() == ERROR_FILE_NOT_FOUND,
+                "Expected ERROR_FILE_NOT_FOUND, got %d.\n", GetLastError());
     }
 
     /* Everything OK, pwszIsFunctionName and pwszIsFunctionNameFmt2 are left NULL
@@ -104,9 +109,14 @@ static void test_AddRemoveProvider(void)
      */
     SetLastError(0xdeadbeef);
     ret = CryptSIPRemoveProvider(&actionid);
-    ok (!ret, "Expected CryptSIPRemoveProvider to fail.\n");
-    ok (GetLastError() == ERROR_FILE_NOT_FOUND,
-        "Expected ERROR_FILE_NOT_FOUND, got %d.\n", GetLastError());
+    /* On some Win98 systems, CryptSIPRemoveProvider always succeeds if
+     * the arguments are correct, whether or not the registry key is
+     * present, so don't test ret, just check the last error if it does
+     * return FALSE.
+     */
+    if (!ret)
+        ok (GetLastError() == ERROR_FILE_NOT_FOUND,
+            "Expected ERROR_FILE_NOT_FOUND, got %d.\n", GetLastError());
 
     /* Everything OK */
     memset(&newprov, 0, sizeof(SIP_ADD_NEWPROVIDER));




More information about the wine-cvs mailing list