Commit a608fe93 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

comdlg32/tests: Don't test function directly when reporting GetLastError().

parent f0b9d9fc
...@@ -647,8 +647,10 @@ static void test_ok(void) ...@@ -647,8 +647,10 @@ static void test_ok(void)
char curdir[MAX_PATH]; char curdir[MAX_PATH];
int i; int i;
DWORD ret; DWORD ret;
BOOL cdret;
ok(GetCurrentDirectoryA(sizeof(curdir), curdir) != 0, "Failed to get current dir err %d\n", GetLastError()); cdret = GetCurrentDirectoryA(sizeof(curdir), curdir);
ok(cdret, "Failed to get current dir err %d\n", GetLastError());
if (!GetTempFileNameA(".", "txt", 0, tmpfilename)) { if (!GetTempFileNameA(".", "txt", 0, tmpfilename)) {
skip("Failed to create a temporary file name\n"); skip("Failed to create a temporary file name\n");
return; return;
...@@ -671,7 +673,8 @@ static void test_ok(void) ...@@ -671,7 +673,8 @@ static void test_ok(void)
ok(ret == ok_testcases[i].expclose, "testid %d: GetOpenFileName returned %#x\n", i, ret); ok(ret == ok_testcases[i].expclose, "testid %d: GetOpenFileName returned %#x\n", i, ret);
ret = CommDlgExtendedError(); ret = CommDlgExtendedError();
ok(!ret, "CommDlgExtendedError returned %#x\n", ret); ok(!ret, "CommDlgExtendedError returned %#x\n", ret);
ok(SetCurrentDirectoryA(curdir), "Failed to restore current dir err %d\n", GetLastError()); cdret = SetCurrentDirectoryA(curdir);
ok(cdret, "Failed to restore current dir err %d\n", GetLastError());
} }
ret = DeleteFileA( tmpfilename); ret = DeleteFileA( tmpfilename);
ok( ret, "Failed to delete temporary file %s err %d\n", tmpfilename, GetLastError()); ok( ret, "Failed to delete temporary file %s err %d\n", tmpfilename, GetLastError());
...@@ -1057,8 +1060,10 @@ static void test_extension(void) ...@@ -1057,8 +1060,10 @@ static void test_extension(void)
char *filename_ptr; char *filename_ptr;
const char *test_file_name = "deadbeef"; const char *test_file_name = "deadbeef";
DWORD ret; DWORD ret;
BOOL cdret;
ok(GetCurrentDirectoryA(sizeof(curdir), curdir) != 0, "Failed to get current dir err %d\n", GetLastError()); cdret = GetCurrentDirectoryA(sizeof(curdir), curdir);
ok(cdret, "Failed to get current dir err %d\n", GetLastError());
/* Ignore .* extension */ /* Ignore .* extension */
ofn.lStructSize = sizeof(ofn); ofn.lStructSize = sizeof(ofn);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment