ucrtbase/tests: Build without -DWINE_NO_LONG_TYPES.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2022-02-11 23:47:45 +01:00 committed by Alexandre Julliard
parent d81afa52ec
commit 066dba1330
5 changed files with 32 additions and 32 deletions

View file

@ -1,6 +1,6 @@
TESTDLL = ucrtbase.dll
IMPORTS = ucrtbase
EXTRADEFS = -DWINE_NO_LONG_TYPES -fno-builtin
EXTRADEFS = -fno-builtin
SOURCES = \
cpp.c \

View file

@ -1168,17 +1168,17 @@ static void test_exit(const char *argv0)
ret = WaitForSingleObject(proc.hProcess, INFINITE);
ok(ret == WAIT_OBJECT_0, "child process wait failed\n");
GetExitCodeProcess(proc.hProcess, &ret);
ok(ret == 1, "child process exited with code %d\n", ret);
ok(ret == 1, "child process exited with code %ld\n", ret);
CloseHandle(proc.hProcess);
CloseHandle(proc.hThread);
ok(!*failures, "%d tests failed in child process\n", *failures);
ok(!*failures, "%ld tests failed in child process\n", *failures);
free_failures_counter(failures, failures_map);
ret = WaitForSingleObject(exit_event, 0);
ok(ret == WAIT_OBJECT_0, "exit_event was not set (%x)\n", ret);
ok(ret == WAIT_OBJECT_0, "exit_event was not set (%lx)\n", ret);
ret = WaitForSingleObject(quick_exit_event, 0);
ok(ret == WAIT_TIMEOUT, "quick_exit_event should not have be set (%x)\n", ret);
ok(ret == WAIT_TIMEOUT, "quick_exit_event should not have be set (%lx)\n", ret);
CloseHandle(exit_event);
CloseHandle(quick_exit_event);
@ -1190,7 +1190,7 @@ static void CDECL at_exit_func1(void)
{
HANDLE exit_event = CreateEventA(NULL, FALSE, FALSE, "exit_event");
ok(exit_event != NULL, "CreateEvent failed: %d\n", GetLastError());
ok(exit_event != NULL, "CreateEvent failed: %ld\n", GetLastError());
ok(atexit_called == 1, "atexit_called = %d\n", atexit_called);
atexit_called++;
SetEvent(exit_event);
@ -1211,7 +1211,7 @@ static void CDECL at_quick_exit_func1(void)
{
HANDLE quick_exit_event = CreateEventA(NULL, FALSE, FALSE, "quick_exit_event");
ok(quick_exit_event != NULL, "CreateEvent failed: %d\n", GetLastError());
ok(quick_exit_event != NULL, "CreateEvent failed: %ld\n", GetLastError());
ok(atquick_exit_called == 1, "atquick_exit_called = %d\n", atquick_exit_called);
atquick_exit_called++;
SetEvent(quick_exit_event);
@ -1269,16 +1269,16 @@ static void test_quick_exit(const char *argv0)
ret = WaitForSingleObject(proc.hProcess, INFINITE);
ok(ret == WAIT_OBJECT_0, "child process wait failed\n");
GetExitCodeProcess(proc.hProcess, &ret);
ok(ret == 2, "child process exited with code %d\n", ret);
ok(ret == 2, "child process exited with code %ld\n", ret);
CloseHandle(proc.hProcess);
CloseHandle(proc.hThread);
ok(!*failures, "%d tests failed in child process\n", *failures);
ok(!*failures, "%ld tests failed in child process\n", *failures);
free_failures_counter(failures, failures_map);
ret = WaitForSingleObject(quick_exit_event, 0);
ok(ret == WAIT_OBJECT_0, "quick_exit_event was not set (%x)\n", ret);
ok(ret == WAIT_OBJECT_0, "quick_exit_event was not set (%lx)\n", ret);
ret = WaitForSingleObject(exit_event, 0);
ok(ret == WAIT_TIMEOUT, "exit_event should not have be set (%x)\n", ret);
ok(ret == WAIT_TIMEOUT, "exit_event should not have be set (%lx)\n", ret);
CloseHandle(exit_event);
CloseHandle(quick_exit_event);

View file

@ -74,7 +74,7 @@ static void __cdecl test_invalid_parameter_handler(const wchar_t *expression,
ok(function == NULL, "function is not NULL\n");
ok(file == NULL, "file is not NULL\n");
ok(line == 0, "line = %u\n", line);
ok(arg == 0, "arg = %lx\n", (UINT_PTR)arg);
ok(arg == 0, "arg = %Ix\n", arg);
}
static int WINAPIV vsprintf_wrapper(unsigned __int64 options, char *str,
@ -838,7 +838,7 @@ static void test_printf_fp(void)
r = vsprintf_wrapper(flags[j], buf, sizeof(buf), tests[i].fmt, tests[i].d);
ok(r == strlen(res) || broken(broken_res && r == strlen(broken_res)),
"%d,%d) r = %d, expected %d\n", i, j, r, strlen(res));
"%d,%d) r = %d, expected %Id\n", i, j, r, strlen(res));
ok(!strcmp(buf, res) || broken(broken_res && !strcmp(buf, broken_res)),
"%d,%d) buf = %s, expected %s\n", i, j, buf, res);
}

View file

@ -66,7 +66,7 @@ static void __cdecl test_invalid_parameter_handler(const wchar_t *expression,
ok(function == NULL, "function is not NULL\n");
ok(file == NULL, "file is not NULL\n");
ok(line == 0, "line = %u\n", line);
ok(arg == 0, "arg = %lx\n", (UINT_PTR)arg);
ok(arg == 0, "arg = %Ix\n", arg);
}
_ACRTIMP int __cdecl _o_tolower(int);

View file

@ -45,11 +45,11 @@ static char *get_thread_dll_path(void)
strcat(path, dll_name);
file = CreateFileA(path, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s: %u.\n",
ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s: %lu.\n",
debugstr_a(path), GetLastError());
res = FindResourceA(NULL, dll_name, "TESTDLL");
ok(!!res, "Failed to load resource: %u\n", GetLastError());
ok(!!res, "Failed to load resource: %lu\n", GetLastError());
ptr = LockResource(LoadResource(GetModuleHandleA(NULL), res));
WriteFile(file, ptr, SizeofResource( GetModuleHandleA(NULL), res), &written, NULL);
ok(written == SizeofResource(GetModuleHandleA(NULL), res), "Failed to write resource\n");
@ -62,7 +62,7 @@ static void set_thead_dll_detach_event(HANDLE dll, HANDLE event)
{
void WINAPI (*_set_detach_event)(HANDLE event);
_set_detach_event = (void*) GetProcAddress(dll, "set_detach_event");
ok(_set_detach_event != NULL, "Failed to get set_detach_event: %u\n", GetLastError());
ok(_set_detach_event != NULL, "Failed to get set_detach_event: %lu\n", GetLastError());
_set_detach_event(event);
}
@ -79,52 +79,52 @@ static void test_thread_library_reference(char *thread_dll,
args.exit_method = exit_method;
detach_event = CreateEventA(NULL, FALSE, FALSE, NULL);
ok(detach_event != NULL, "Failed to create an event: %u\n", GetLastError());
ok(detach_event != NULL, "Failed to create an event: %lu\n", GetLastError());
args.confirm_running = CreateEventA(NULL, FALSE, FALSE, NULL);
ok(args.confirm_running != NULL, "Failed to create an event: %u\n", GetLastError());
ok(args.confirm_running != NULL, "Failed to create an event: %lu\n", GetLastError());
args.past_free = CreateEventA(NULL, FALSE, FALSE, NULL);
ok(args.past_free != NULL, "Failed to create an event: %u\n", GetLastError());
ok(args.past_free != NULL, "Failed to create an event: %lu\n", GetLastError());
dll = LoadLibraryA(thread_dll);
ok(dll != NULL, "Failed to load the test dll: %u\n", GetLastError());
ok(dll != NULL, "Failed to load the test dll: %lu\n", GetLastError());
set_thead_dll_detach_event(dll, detach_event);
if (beginthread_method == use_beginthreadex)
{
_beginthreadex_start_routine_t proc = (void*) GetProcAddress(dll, "stdcall_thread_proc");
ok(proc != NULL, "Failed to get stdcall_thread_proc: %u\n", GetLastError());
ok(proc != NULL, "Failed to get stdcall_thread_proc: %lu\n", GetLastError());
thread_handle = _beginthreadex(NULL, 0, proc, &args, 0, NULL);
}
else
{
_beginthread_start_routine_t proc = (void*) GetProcAddress(dll, "cdecl_thread_proc");
ok(proc != NULL, "Failed to get stdcall_thread_proc: %u\n", GetLastError());
ok(proc != NULL, "Failed to get stdcall_thread_proc: %lu\n", GetLastError());
thread_handle = _beginthread(proc, 0, &args);
}
ok(thread_handle != -1 && thread_handle != 0, "Failed to begin thread: %u\n", errno);
ret = FreeLibrary(dll);
ok(ret, "Failed to free the library: %u\n", GetLastError());
ok(ret, "Failed to free the library: %lu\n", GetLastError());
ret = WaitForSingleObject(args.confirm_running, 200);
ok(ret == WAIT_OBJECT_0, "Event was not signaled, ret: %u, err: %u\n", ret, GetLastError());
ok(ret == WAIT_OBJECT_0, "Event was not signaled, ret: %lu, err: %lu\n", ret, GetLastError());
ret = WaitForSingleObject(detach_event, 0);
ok(ret == WAIT_TIMEOUT, "Thread detach happened unexpectedly signaling an event, ret: %d, err: %u\n", ret, GetLastError());
ok(ret == WAIT_TIMEOUT, "Thread detach happened unexpectedly signaling an event, ret: %ld, err: %lu\n", ret, GetLastError());
ret = SetEvent(args.past_free);
ok(ret, "Failed to signal event: %d\n", GetLastError());
ok(ret, "Failed to signal event: %ld\n", GetLastError());
if (beginthread_method == use_beginthreadex)
{
ret = WaitForSingleObject((HANDLE)thread_handle, 200);
ok(ret == WAIT_OBJECT_0, "Thread has not exited, ret: %d, err: %u\n", ret, GetLastError());
ok(ret == WAIT_OBJECT_0, "Thread has not exited, ret: %ld, err: %lu\n", ret, GetLastError());
}
ret = WaitForSingleObject(detach_event, 200);
ok(ret == WAIT_OBJECT_0, "Detach event was not signaled, ret: %d, err: %u\n", ret, GetLastError());
ok(ret == WAIT_OBJECT_0, "Detach event was not signaled, ret: %ld, err: %lu\n", ret, GetLastError());
if (beginthread_method == use_beginthreadex)
CloseHandle((HANDLE)thread_handle);
@ -153,14 +153,14 @@ static void test_thread_invalid_params(void)
errno = 0;
handler_called = FALSE;
hThread = _beginthreadex(NULL, 0, NULL, NULL, 0, NULL);
ok(hThread == 0, "_beginthreadex unexpected ret: %d\n", hThread);
ok(hThread == 0, "_beginthreadex unexpected ret: %Iu\n", hThread);
ok(errno == EINVAL, "_beginthreadex unexpected errno: %d\n", errno);
ok(handler_called, "Expected invalid_parameter_handler to be called\n");
errno = 0;
handler_called = FALSE;
hThread = _beginthread(NULL, 0, NULL);
ok(hThread == -1, "_beginthread unexpected ret: %d\n", hThread);
ok(hThread == -1, "_beginthread unexpected ret: %Iu\n", hThread);
ok(errno == EINVAL, "_beginthread unexpected errno: %d\n", errno);
ok(handler_called, "Expected invalid_parameter_handler to be called\n");
@ -178,7 +178,7 @@ START_TEST(thread)
test_thread_library_reference(thread_dll, use_beginthreadex, thread_exit_endthreadex);
ret = DeleteFileA(thread_dll);
ok(ret, "Failed to remove the test dll, err: %u\n", GetLastError());
ok(ret, "Failed to remove the test dll, err: %lu\n", GetLastError());
test_thread_invalid_params();
}