tests: Use stdbool.

This commit is contained in:
Józef Kucia 2016-10-24 13:20:09 +02:00
parent ed50a4e7f5
commit 81164d43f7
2 changed files with 7 additions and 6 deletions

View File

@ -25,6 +25,7 @@
#include <inttypes.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -91,7 +92,7 @@ static struct
} vkd3d_test_state;
static void VKD3D_PRINTF_FUNC(3, 4) VKD3D_UNUSED
vkd3d_test_ok(unsigned int line, int result, const char *fmt, ...)
vkd3d_test_ok(unsigned int line, bool result, const char *fmt, ...)
{
if (result)
{
@ -111,7 +112,7 @@ vkd3d_test_ok(unsigned int line, int result, const char *fmt, ...)
}
static void VKD3D_PRINTF_FUNC(3, 4) VKD3D_UNUSED
vkd3d_test_todo(unsigned int line, int result, const char *fmt, ...)
vkd3d_test_todo(unsigned int line, bool result, const char *fmt, ...)
{
va_list args;
@ -180,4 +181,4 @@ int main(void)
return vkd3d_test_state.failure_count || vkd3d_test_state.todo_success_count;
}
#endif /* __VKD3D_TEST__H */
#endif /* __VKD3D_TEST_H */

View File

@ -68,7 +68,7 @@ static ULONG get_refcount_(IUnknown *iface)
}
#define check_interface(a, b, c) check_interface_(__LINE__, (IUnknown *)a, b, c)
static void check_interface_(unsigned int line, IUnknown *iface, REFIID riid, BOOL supported)
static void check_interface_(unsigned int line, IUnknown *iface, REFIID riid, bool supported)
{
HRESULT hr, expected_hr;
IUnknown *unk;
@ -223,7 +223,7 @@ static HANDLE create_thread(thread_main_pfn main_pfn, void *user_data)
return CreateThread(NULL, 0, test_thread_main, data, 0, NULL);
}
static BOOL join_thread(HANDLE thread)
static bool join_thread(HANDLE thread)
{
int ret;
@ -266,7 +266,7 @@ static HANDLE create_thread(thread_main_pfn main_pfn, void *user_data)
return thread;
}
static BOOL join_thread(HANDLE untyped_thread)
static bool join_thread(HANDLE untyped_thread)
{
pthread_t *thread = untyped_thread;
int rc;