From 73af2479c7107f6157cabdd24dc1e0fe47fbbb1e Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Mon, 26 Jun 2017 13:48:19 +0000 Subject: [PATCH] regedit/tests: Use the verify_key*() functions where possible. Signed-off-by: Hugh McMaster Signed-off-by: Alexandre Julliard --- 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 bc2fe46fd05..83fe725f3f2 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" -- 2.11.4.GIT