Detlef Riekenberg : advapi32/tests: Handle the results from Win9x in the registry tests.

Alexandre Julliard julliard at winehq.org
Wed Jul 30 08:35:59 CDT 2008


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

Author: Detlef Riekenberg <wine.dev at web.de>
Date:   Tue Jul 29 23:58:04 2008 +0200

advapi32/tests: Handle the results from Win9x in the registry tests.

---

 dlls/advapi32/tests/registry.c |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index 94ce15a..95608c6 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -159,9 +159,8 @@ static const char *wine_debugstr_wn( const WCHAR *str, int n )
 
 
 #define ADVAPI32_GET_PROC(func) \
-    p ## func = (void*)GetProcAddress(hadvapi32, #func); \
-    if(!p ## func) \
-      trace("GetProcAddress(%s) failed\n", #func);
+    p ## func = (void*)GetProcAddress(hadvapi32, #func);
+
 
 static void InitFunctionPtrs(void)
 {
@@ -332,13 +331,21 @@ static void test_set_value(void)
     test_hkey_main_Value_A(NULL, substring2A, sizeof(substring2A));
     test_hkey_main_Value_W(NULL, substring2W, sizeof(substring2W));
 
-    /* only REG_SZ is supported */
+    /* only REG_SZ is supported on NT*/
     ret = RegSetValueA(hkey_main, NULL, REG_BINARY, string2A, sizeof(string2A));
-    ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueA should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret);
+    /* NT: ERROR_INVALID_PARAMETER, 9x: ERROR_SUCCESS */
+    ok(ret == ERROR_INVALID_PARAMETER || broken(ret == ERROR_SUCCESS),
+        "got %d (expected ERROR_INVALID_PARAMETER or ERROR_SUCCESS)\n", ret);
+
     ret = RegSetValueA(hkey_main, NULL, REG_EXPAND_SZ, string2A, sizeof(string2A));
-    ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueA should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret);
+    /* NT: ERROR_INVALID_PARAMETER, 9x: ERROR_SUCCESS */
+    ok(ret == ERROR_INVALID_PARAMETER || broken(ret == ERROR_SUCCESS),
+        "got %d (expected ERROR_INVALID_PARAMETER or ERROR_SUCCESS)\n", ret);
+
     ret = RegSetValueA(hkey_main, NULL, REG_MULTI_SZ, string2A, sizeof(string2A));
-    ok(ret == ERROR_INVALID_PARAMETER, "RegSetValueA should have returned ERROR_INVALID_PARAMETER instead of %d\n", ret);
+    /* NT: ERROR_INVALID_PARAMETER, 9x: ERROR_SUCCESS */
+    ok(ret == ERROR_INVALID_PARAMETER || broken(ret == ERROR_SUCCESS),
+        "got %d (expected ERROR_INVALID_PARAMETER or ERROR_SUCCESS)\n", ret);
 
     /* Test RegSetValueExA with a 'zero-byte' string (as Office 2003 does).
      * Surprisingly enough we're supposed to get zero bytes out of it.




More information about the wine-cvs mailing list