57#define ok(value, ...) do { \
58 atltest_set_location(__FILE__, __LINE__); \
59 atltest_ok(value, __VA_ARGS__); \
61#define ok_(x1,x2) atltest_set_location(x1,x2); atltest_ok
64#define skip(...) do { \
65 atltest_set_location(__FILE__, __LINE__); \
66 atltest_skip(__VA_ARGS__); \
75#define START_TEST(x) \
76 const char *g_atltest_name = #x; \
77 static void atltest_start_test(void)
82 printf(
"%s: %d tests executed (0 marked as todo, %d failures), %d skipped.\n",
94#define ok_hex(expression, result) \
96 int _value = (expression); \
97 ok(_value == (result), "Wrong value for '%s', expected: " #result " (0x%x), got: 0x%x\n", \
98 #expression, (int)(result), _value); \
101#define ok_dec(expression, result) \
103 int _value = (expression); \
104 ok(_value == (result), "Wrong value for '%s', expected: " #result " (%d), got: %d\n", \
105 #expression, (int)(result), _value); \
108#define ok_ptr(expression, result) \
110 const void *_value = (expression); \
111 ok(_value == (result), "Wrong value for '%s', expected: " #result " (%p), got: %p\n", \
112 #expression, (void*)(result), _value); \
115#define ok_size_t(expression, result) \
117 size_t _value = (expression); \
118 ok(_value == (result), "Wrong value for '%s', expected: " #result " (%Ix), got: %Ix\n", \
119 #expression, (size_t)(result), _value); \
122#define ok_char(expression, result) ok_hex(expression, result)
124#define ok_err(error) \
125 ok(GetLastError() == (error), "Wrong last error. Expected " #error ", got 0x%lx\n", GetLastError())
127#define ok_str(x, y) \
128 ok(strcmp(x, y) == 0, "Wrong string. Expected '%s', got '%s'\n", y, x)
130#define ok_wstr(x, y) \
131 ok(wcscmp(x, y) == 0, "Wrong string. Expected '%S', got '%S'\n", y, x)
133#define ok_long(expression, result) ok_hex(expression, result)
134#define ok_int(expression, result) ok_dec(expression, result)
135#define ok_ntstatus(status, expected) ok_hex(status, expected)
140 static char s_asz[4][40];
147 return "(invalid ptr)";
151 sprintf_s(
buf,
_countof(s_asz[0]),
"(%ld, %ld)", ppt->
x, ppt->
y);
162 static char s_asz[4][80];
169 return "(invalid ptr)";
173 sprintf_s(
buf,
_countof(s_asz[0]),
"(%ld, %ld) - (%ld, %ld)",
static const char * wine_dbgstr_point(const POINT *ppt)
static void atltest_start_test(void)
void atltest_set_location(const char *file, int line)
static const char * wine_dbgstr_size(const SIZE *psize)
const char * g_atltest_name
void atltest_skip(const char *fmt,...)
static const char * wine_dbgstr_rect(const RECT *prc)
const char * g_atltest_file
void atltest_ok(int value, const char *fmt,...)
#define WideCharToMultiByte
GLenum GLuint GLenum GLsizei const GLchar * buf
_Check_return_opt_ _CRTIMP int __cdecl vprintf(_In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
_Must_inspect_result_ _Out_ LPSIZE psize
#define IS_INTRESOURCE(i)