Hugh McMaster : regedit/tests: Use the verify_key*() functions where possible.

Alexandre Julliard julliard at winehq.org
Mon Jun 26 15:17:52 CDT 2017


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

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Mon Jun 26 13:48:19 2017 +0000

regedit/tests: Use the verify_key*() functions where possible.

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/regedit/tests/regedit.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c
index bc2fe46..83fe725 100644
--- a/programs/regedit/tests/regedit.c
+++ b/programs/regedit/tests/regedit.c
@@ -550,7 +550,7 @@ static void test_basic_import_31(void)
 static void test_invalid_import(void)
 {
     LONG lr;
-    HKEY hkey, subkey;
+    HKEY hkey;
 
     lr = RegDeleteKeyA(HKEY_CURRENT_USER, KEY_BASE);
     ok(lr == ERROR_SUCCESS || lr == ERROR_FILE_NOT_FOUND, "RegDeleteKeyA failed: %d\n", lr);
@@ -725,14 +725,12 @@ static void test_invalid_import(void)
     exec_import_str("REGEDIT4\n\n"
                     "[HKEY_CURRENT_USER\\" KEY_BASE "\\\n"
                     "Subkey1]\n");
-    lr = RegOpenKeyExA(hkey, "Subkey1", 0, KEY_READ, &subkey);
-    ok(lr == ERROR_FILE_NOT_FOUND, "got %d, expected 2\n", lr);
+    verify_key_nonexist(hkey, "Subkey1");
 
     exec_import_str("REGEDIT4\n\n"
                     "[HKEY_CURRENT_USER\\" KEY_BASE "\n"
                     "\\Subkey2]\n");
-    lr = RegOpenKeyExA(hkey, "Subkey2", 0, KEY_READ, &subkey);
-    ok(lr == ERROR_FILE_NOT_FOUND, "got %d, expected 2\n", lr);
+    verify_key_nonexist(hkey, "Subkey2");
 
     exec_import_str("REGEDIT4\n\n"
                     "[HKEY_CURRENT_USER\\" KEY_BASE "]\n"




More information about the wine-cvs mailing list