ole32/tests: Don't trace last error when error code is returned directly.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-03-05 08:02:18 +03:00 committed by Alexandre Julliard
parent 485a412b18
commit 2a1e856bd9
1 changed files with 7 additions and 8 deletions

View File

@ -2098,12 +2098,11 @@ static void test_TreatAsClass(void)
ok (IsEqualGUID(&out,&deadbeef), "expected to get same clsid back\n"); ok (IsEqualGUID(&out,&deadbeef), "expected to get same clsid back\n");
lr = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID", 0, KEY_READ, &clsidkey); lr = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID", 0, KEY_READ, &clsidkey);
ok(lr == ERROR_SUCCESS, "Couldn't open CLSID key\n"); ok(!lr, "Couldn't open CLSID key, error %d\n", lr);
lr = RegCreateKeyExA(clsidkey, deadbeefA, 0, NULL, 0, KEY_WRITE, NULL, &deadbeefkey, NULL); lr = RegCreateKeyExA(clsidkey, deadbeefA, 0, NULL, 0, KEY_WRITE, NULL, &deadbeefkey, NULL);
if (lr) { if (lr) {
win_skip("CoGetTreatAsClass() tests will be skipped (failed to create a test key, error %d)\n", win_skip("CoGetTreatAsClass() tests will be skipped (failed to create a test key, error %d)\n", lr);
GetLastError());
RegCloseKey(clsidkey); RegCloseKey(clsidkey);
return; return;
} }
@ -2377,13 +2376,13 @@ static void test_OleRegGetUserType(void)
return; return;
} }
ok(!ret, "failed to create a key %d, error %d\n", ret, GetLastError()); ok(!ret, "failed to create a key, error %d\n", ret);
ret = RegSetValueExW(classkey, NULL, 0, REG_SZ, (const BYTE*)defvalueW, sizeof(defvalueW)); ret = RegSetValueExW(classkey, NULL, 0, REG_SZ, (const BYTE*)defvalueW, sizeof(defvalueW));
ok(!ret, "got %d, error %d\n", ret, GetLastError()); ok(!ret, "got error %d\n", ret);
ret = RegCreateKeyExA(classkey, "AuxUserType", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &auxhkey, NULL); ret = RegCreateKeyExA(classkey, "AuxUserType", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &auxhkey, NULL);
ok(!ret, "got %d, error %d\n", ret, GetLastError()); ok(!ret, "got error %d\n", ret);
/* populate AuxUserType */ /* populate AuxUserType */
for (i = 0; i <= 4; i++) { for (i = 0; i <= 4; i++) {
@ -2391,10 +2390,10 @@ static void test_OleRegGetUserType(void)
sprintf(name, "AuxUserType\\%d", i); sprintf(name, "AuxUserType\\%d", i);
ret = RegCreateKeyExA(classkey, name, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey, NULL); ret = RegCreateKeyExA(classkey, name, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey, NULL);
ok(!ret, "got %d, error %d\n", ret, GetLastError()); ok(!ret, "got error %d\n", ret);
ret = RegSetValueExA(hkey, NULL, 0, REG_SZ, (const BYTE*)auxvalues[i], strlen(auxvalues[i])); ret = RegSetValueExA(hkey, NULL, 0, REG_SZ, (const BYTE*)auxvalues[i], strlen(auxvalues[i]));
ok(!ret, "got %d, error %d\n", ret, GetLastError()); ok(!ret, "got error %d\n", ret);
RegCloseKey(hkey); RegCloseKey(hkey);
} }