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

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

parent 2774d404
......@@ -71,9 +71,10 @@ static const int max_test_dir_size = 20; /* size of above plus some for .. etc
static void set_up_attribute_test(const char *testdirA)
{
int i;
BOOL ret;
ok(CreateDirectoryA(testdirA, NULL),
"couldn't create dir '%s', error %d\n", testdirA, GetLastError());
ret = CreateDirectoryA(testdirA, NULL);
ok(ret, "couldn't create dir '%s', error %d\n", testdirA, GetLastError());
for (i=0; testfiles[i].name; i++) {
char buf[MAX_PATH];
......@@ -82,8 +83,8 @@ static void set_up_attribute_test(const char *testdirA)
sprintf(buf, "%s\\%s", testdirA, testfiles[i].name);
testfiles[i].nfound = 0;
if (testfiles[i].attr & FILE_ATTRIBUTE_DIRECTORY) {
ok(CreateDirectoryA(buf, NULL),
"couldn't create dir '%s', error %d\n", buf, GetLastError());
ret = CreateDirectoryA(buf, NULL);
ok(ret, "couldn't create dir '%s', error %d\n", buf, GetLastError());
} else {
HANDLE h = CreateFileA(buf,
GENERIC_READ|GENERIC_WRITE,
......
......@@ -828,8 +828,10 @@ static void test_debugger(void)
} while (de.dwDebugEventCode != EXIT_PROCESS_DEBUG_EVENT);
winetest_wait_child_process( pi.hProcess );
ok(CloseHandle(pi.hThread) != 0, "error %u\n", GetLastError());
ok(CloseHandle(pi.hProcess) != 0, "error %u\n", GetLastError());
ret = CloseHandle(pi.hThread);
ok(ret, "error %u\n", GetLastError());
ret = CloseHandle(pi.hProcess);
ok(ret, "error %u\n", GetLastError());
return;
}
......
......@@ -456,6 +456,7 @@ static void read_file_test(void)
char buffer[128];
LARGE_INTEGER offset;
HANDLE event = CreateEventA( NULL, TRUE, FALSE, NULL );
BOOL ret;
buffer[0] = 1;
......@@ -599,8 +600,8 @@ static void read_file_test(void)
CloseHandle( read );
if (!create_pipe( &read, &write, FILE_FLAG_OVERLAPPED, 4096 )) return;
ok(DuplicateHandle(GetCurrentProcess(), read, GetCurrentProcess(), &handle, 0, TRUE, DUPLICATE_SAME_ACCESS),
"Failed to duplicate handle: %d\n", GetLastError());
ret = DuplicateHandle(GetCurrentProcess(), read, GetCurrentProcess(), &handle, 0, TRUE, DUPLICATE_SAME_ACCESS);
ok(ret, "Failed to duplicate handle: %d\n", GetLastError());
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
......
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