Paul Vriens : advapi32/tests: Fix RegQueryValueExA test for win9x and ME.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Apr 12 09:59:54 CDT 2007


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

Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date:   Wed Apr 11 20:33:02 2007 +0200

advapi32/tests: Fix RegQueryValueExA test for win9x and ME.

---

 dlls/advapi32/tests/registry.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index 9d2a544..2d84058 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -369,13 +369,20 @@ static void test_query_value_ex(void)
     size = 0xdeadbeef;
     ret = RegQueryValueExA(HKEY_CLASSES_ROOT, "Nonexistent Value", NULL, &type, NULL, &size);
     ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", ret);
-    ok(size == 0, "size should have been set to 0 instead of %d\n", size);
     /* the type parameter is cleared on Win9x, but is set to a random value on
-     * NT, so don't do this test there */
+     * NT, so don't do that test there. The size parameter is left untouched on Win9x
+     * but cleared on NT+, this can be tested on all platforms.
+     */
     if (GetVersion() & 0x80000000)
+    {
         ok(type == 0, "type should have been set to 0 instead of 0x%x\n", type);
+        ok(size == 0xdeadbeef, "size should have been left untouched (0xdeadbeef)\n");
+    }
     else
+    {
         trace("test_query_value_ex: type set to: 0x%08x\n", type);
+        ok(size == 0, "size should have been set to 0 instead of %d\n", size);
+    }
 
     size = sizeof(buffer);
     ret = RegQueryValueExA(HKEY_CLASSES_ROOT, "Nonexistent Value", NULL, &type, buffer, &size);




More information about the wine-cvs mailing list