reg/tests: Update error messages.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2021-04-30 22:39:48 +10:00 committed by Alexandre Julliard
parent 357601a01b
commit 08786274e2
1 changed files with 11 additions and 11 deletions

View File

@ -57,18 +57,18 @@ void verify_reg_(const char *file, unsigned line, HKEY hkey, const char *value,
size = sizeof(data); size = sizeof(data);
memset(data, 0xdd, size); memset(data, 0xdd, size);
err = RegQueryValueExA(hkey, value, NULL, &type, data, &size); err = RegQueryValueExA(hkey, value, NULL, &type, data, &size);
lok(err == ERROR_SUCCESS, "RegQueryValueEx failed: got %d\n", err); lok(err == ERROR_SUCCESS, "RegQueryValueEx failed: got error %d\n", err);
if (err != ERROR_SUCCESS) if (err != ERROR_SUCCESS)
return; return;
todo_wine_if (todo & TODO_REG_TYPE) todo_wine_if (todo & TODO_REG_TYPE)
lok(type == exp_type, "got wrong type %d, expected %d\n", type, exp_type); lok(type == exp_type, "got registry type %d, expected %d\n", type, exp_type);
todo_wine_if (todo & TODO_REG_SIZE) todo_wine_if (todo & TODO_REG_SIZE)
lok(size == exp_size, "got wrong size %d, expected %d\n", size, exp_size); lok(size == exp_size, "got data size %d, expected %d\n", size, exp_size);
if (exp_data) if (exp_data)
{ {
todo_wine_if (todo & TODO_REG_DATA) todo_wine_if (todo & TODO_REG_DATA)
lok(memcmp(data, exp_data, size) == 0, "got wrong data\n"); lok(memcmp(data, exp_data, size) == 0, "registry data does not match\n");
} }
} }
@ -87,7 +87,7 @@ void open_key_(const char *file, unsigned line, const HKEY base, const char *pat
LONG err; LONG err;
err = RegOpenKeyExA(base, path, 0, KEY_READ|sam, hkey); err = RegOpenKeyExA(base, path, 0, KEY_READ|sam, hkey);
lok(err == ERROR_SUCCESS, "RegOpenKeyExA failed: %d\n", err); lok(err == ERROR_SUCCESS, "RegOpenKeyExA failed: got error %d\n", err);
} }
void close_key_(const char *file, unsigned line, HKEY hkey) void close_key_(const char *file, unsigned line, HKEY hkey)
@ -95,7 +95,7 @@ void close_key_(const char *file, unsigned line, HKEY hkey)
LONG err; LONG err;
err = RegCloseKey(hkey); err = RegCloseKey(hkey);
lok(err == ERROR_SUCCESS, "RegCloseKey failed: %d\n", err); lok(err == ERROR_SUCCESS, "RegCloseKey failed: got error %d\n", err);
} }
void verify_key_(const char *file, unsigned line, HKEY key_base, const char *subkey) void verify_key_(const char *file, unsigned line, HKEY key_base, const char *subkey)
@ -104,7 +104,7 @@ void verify_key_(const char *file, unsigned line, HKEY key_base, const char *sub
LONG err; LONG err;
err = RegOpenKeyExA(key_base, subkey, 0, KEY_READ, &hkey); err = RegOpenKeyExA(key_base, subkey, 0, KEY_READ, &hkey);
lok(err == ERROR_SUCCESS, "RegOpenKeyExA failed: got %d\n", err); lok(err == ERROR_SUCCESS, "RegOpenKeyExA failed: got error %d\n", err);
if (hkey) if (hkey)
RegCloseKey(hkey); RegCloseKey(hkey);
@ -130,7 +130,7 @@ void add_key_(const char *file, unsigned line, const HKEY hkey, const char *path
err = RegCreateKeyExA(hkey, path, 0, NULL, REG_OPTION_NON_VOLATILE, err = RegCreateKeyExA(hkey, path, 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_READ|KEY_WRITE, NULL, &new_key, NULL); KEY_READ|KEY_WRITE, NULL, &new_key, NULL);
lok(err == ERROR_SUCCESS, "RegCreateKeyExA failed: %d\n", err); lok(err == ERROR_SUCCESS, "RegCreateKeyExA failed: got error %d\n", err);
if (subkey) if (subkey)
*subkey = new_key; *subkey = new_key;
@ -145,7 +145,7 @@ void delete_key_(const char *file, unsigned line, const HKEY hkey, const char *p
LONG err; LONG err;
err = RegDeleteKeyA(hkey, path); err = RegDeleteKeyA(hkey, path);
lok(err == ERROR_SUCCESS, "RegDeleteKeyA failed: %d\n", err); lok(err == ERROR_SUCCESS, "RegDeleteKeyA failed: got error %d\n", err);
} }
} }
@ -197,7 +197,7 @@ void add_value_(const char *file, unsigned line, HKEY hkey, const char *name,
LONG err; LONG err;
err = RegSetValueExA(hkey, name, 0, type, (const BYTE *)data, size); err = RegSetValueExA(hkey, name, 0, type, (const BYTE *)data, size);
lok(err == ERROR_SUCCESS, "RegSetValueExA failed: %d\n", err); lok(err == ERROR_SUCCESS, "RegSetValueExA failed: got error %d\n", err);
} }
void delete_value_(const char *file, unsigned line, const HKEY hkey, const char *name) void delete_value_(const char *file, unsigned line, const HKEY hkey, const char *name)
@ -205,7 +205,7 @@ void delete_value_(const char *file, unsigned line, const HKEY hkey, const char
LONG err; LONG err;
err = RegDeleteValueA(hkey, name); err = RegDeleteValueA(hkey, name);
lok(err == ERROR_SUCCESS, "RegDeleteValueA failed: %d\n", err); lok(err == ERROR_SUCCESS, "RegDeleteValueA failed: got error %d\n", err);
} }
/* Unit tests */ /* Unit tests */