Module: wine Branch: master Commit: 2a1e856bd93cbbd6d536b6d7cdaa3c42aa19b759 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2a1e856bd93cbbd6d536b6d7cd...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sat Mar 5 08:02:18 2016 +0300
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
---
dlls/ole32/tests/compobj.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c index 49aced9..65a8fb5 100644 --- a/dlls/ole32/tests/compobj.c +++ b/dlls/ole32/tests/compobj.c @@ -2098,12 +2098,11 @@ static void test_TreatAsClass(void) ok (IsEqualGUID(&out,&deadbeef), "expected to get same clsid back\n");
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); if (lr) { - win_skip("CoGetTreatAsClass() tests will be skipped (failed to create a test key, error %d)\n", - GetLastError()); + win_skip("CoGetTreatAsClass() tests will be skipped (failed to create a test key, error %d)\n", lr); RegCloseKey(clsidkey); return; } @@ -2377,13 +2376,13 @@ static void test_OleRegGetUserType(void) 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)); - 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); - ok(!ret, "got %d, error %d\n", ret, GetLastError()); + ok(!ret, "got error %d\n", ret);
/* populate AuxUserType */ for (i = 0; i <= 4; i++) { @@ -2391,10 +2390,10 @@ static void test_OleRegGetUserType(void)
sprintf(name, "AuxUserType\%d", i); 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])); - ok(!ret, "got %d, error %d\n", ret, GetLastError()); + ok(!ret, "got error %d\n", ret); RegCloseKey(hkey); }