ReactOS 0.4.16-dev-1946-g52006dd
minitest.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Tests
3 * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4 * PURPOSE: Lightweight testing routines, based on an updated version of wine/test.h
5 * COPYRIGHT: Copyright 2025 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
6 */
7
8#ifndef __MINI_WINE_TEST_H
9#define __MINI_WINE_TEST_H
10
11#include <stdarg.h>
12#include <stdlib.h>
13#include <windef.h>
14#include <winbase.h>
15#include <wine/debug.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21/* debug level */
22extern int winetest_debug;
23
24extern int report_success;
25
26/* running in interactive mode? */
27extern int winetest_interactive;
28
29/* current platform */
30extern const char *winetest_platform;
31
32extern void winetest_set_location( const char* file, int line );
33extern void winetest_subtest(const char* name);
34extern void winetest_start_todo( int is_todo );
35extern int winetest_loop_todo(void);
36extern void winetest_end_todo(void);
37extern void winetest_start_nocount(unsigned int flags);
38extern int winetest_loop_nocount(void);
39extern void winetest_end_nocount(void);
40#if 0
41extern int winetest_get_mainargs( char*** pargv );
42#endif
45extern void winetest_add_failures( LONG new_failures );
46
47extern int broken( int condition );
48extern int winetest_vok( int condition, const char *msg, va_list ap );
49extern void winetest_vskip( const char *msg, va_list ap );
50
51extern void __cdecl winetest_ok( int condition, const char *msg, ... ) __WINE_PRINTF_ATTR(2,3);
52extern void __cdecl winetest_skip( const char *msg, ... ) __WINE_PRINTF_ATTR(1,2);
53extern void __cdecl winetest_win_skip( const char *msg, ... ) __WINE_PRINTF_ATTR(1,2);
54extern void __cdecl winetest_trace( const char *msg, ... ) __WINE_PRINTF_ATTR(1,2);
56extern void winetest_pop_context(void);
57
58#define subtest_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_subtest
59#define ok_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_ok
60#define skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_skip
61#define win_skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_win_skip
62#define trace_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_trace
63
64#define subtest subtest_(__RELFILE__, __LINE__)
65#define ok ok_(__RELFILE__, __LINE__)
66#define skip skip_(__RELFILE__, __LINE__)
67#define win_skip win_skip_(__RELFILE__, __LINE__)
68#define trace trace_(__RELFILE__, __LINE__)
69
70#define todo_if(is_todo) for (winetest_start_todo(is_todo); \
71 winetest_loop_todo(); \
72 winetest_end_todo())
73
74#define todo_ros todo_if(!strcmp(winetest_platform, "reactos"))
75#define todo_ros_if(is_todo) todo_if((is_todo) && !strcmp(winetest_platform, "reactos"))
76#ifdef USE_WINE_TODOS
77#define todo_wine todo_ros
78#define todo_wine_if todo_ros_if
79#else
80#define todo_wine todo_if(!strcmp(winetest_platform, "wine"))
81#define todo_wine_if(is_todo) todo_if((is_todo) && !strcmp(winetest_platform, "wine"))
82#endif
83
84#define ros_skip_flaky for (winetest_start_nocount(3); \
85 winetest_loop_nocount(); \
86 winetest_end_nocount())
87
88#define disable_success_count for (winetest_start_nocount(1); \
89 winetest_loop_nocount(); \
90 winetest_end_nocount())
91
92#define skip_2k3_crash if (_winver < 0x600) skip("Test skipped, because it crashes on win 2003\n"); else
93#define skip_2k3_fail if (_winver < 0x600) skip("Test skipped, because it fails on win 2003\n"); else
94
95#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
96
97
98/************************************************************************/
99/* Below is the implementation of the various functions, to be included
100 * directly into the generated testlist.c file.
101 * It is done that way so that the dlls can build the test routines with
102 * different includes or flags if needed.
103 */
104
105#ifdef STANDALONE
106
107#include <stdio.h>
108
109/* Define WINETEST_MSVC_IDE_FORMATTING to alter the output format winetest will use for file/line numbers.
110 This alternate format makes the file/line numbers clickable in visual studio, to directly jump to them. */
111#if defined(WINETEST_MSVC_IDE_FORMATTING)
112# define __winetest_file_line_prefix "%s(%d)"
113#else
114# define __winetest_file_line_prefix "%s:%d"
115#endif
116
117struct test
118{
119 const char *name;
120 void (*func)(void);
121};
122
123extern const struct test winetest_testlist[];
124
125/* debug level */
126int winetest_debug = 1;
127
128/* interactive mode? */
130
131/* current platform */
132const char *winetest_platform = "windows";
133
134/* report successful tests (BOOL) */
135int report_success = 0;
136
137#if 0
138/* passing arguments around */
139static int winetest_argc;
140static char** winetest_argv;
141#endif
142
143static const struct test *current_test; /* test currently being run */
144
145static LONG winetest_successes; /* number of successful tests */
146static LONG winetest_failures; /* number of failures */
147static LONG winetest_skipped; /* number of skipped test chunks */
148static LONG winetest_todo_successes; /* number of successful tests inside todo block */
149static LONG winetest_todo_failures; /* number of failures inside todo block */
150
151/* The following data must be kept track of on a per-thread basis */
152struct winetest_thread_data
153{
154 const char* current_file; /* file of current check */
155 int current_line; /* line of current check */
156 unsigned int todo_level; /* current todo nesting level */
157 unsigned int nocount_level;
158 int todo_do_loop;
159#if 0
160 char *str_pos; /* position in debug buffer */
161 char strings[2000]; /* buffer for debug strings */
162#endif
163 char context[8][128]; /* data to print before messages */
164 unsigned int context_count; /* number of context prefixes */
165} tls_data;
166
167static DWORD tls_index;
168
169static struct winetest_thread_data *winetest_get_thread_data(void)
170{
171 struct winetest_thread_data *data;
173
176 if (!data)
177 {
179#if 0
180 data->str_pos = data->strings;
181#endif
183 }
185 return data;
186}
187
188static int winetest_vprintf( const char *msg, va_list args )
189{
190 static struct __wine_debug_functions s_Debug = {NULL};
191 if (!s_Debug.dbg_vprintf)
192 __wine_dbg_set_functions(NULL, &s_Debug, sizeof(s_Debug));
193
194 return s_Debug.dbg_vprintf( msg, args );
195}
196
197void winetest_set_location( const char* file, int line )
198{
199 struct winetest_thread_data *data = winetest_get_thread_data();
200#if 1 /*|| defined(WINETEST_MSVC_IDE_FORMATTING)*/
201 data->current_file = file;
202#else
203 data->current_file=strrchr(file,'/');
204 if (data->current_file==NULL)
205 data->current_file=strrchr(file,'\\');
206 if (data->current_file==NULL)
207 data->current_file=file;
208 else
209 data->current_file++;
210#endif
211 data->current_line=line;
212}
213
214static int __cdecl winetest_printf( const char *msg, ... ) __WINE_PRINTF_ATTR(1,2);
215static int __cdecl winetest_printf( const char *msg, ... )
216{
218 int ret;
219
220 va_start( valist, msg );
221 ret = winetest_vprintf( msg, valist );
222 va_end( valist );
223
224 return ret;
225}
226
227static void __cdecl winetest_print_location( const char *msg, ... ) __WINE_PRINTF_ATTR(1,2);
228static void __cdecl winetest_print_location( const char *msg, ... )
229{
230 struct winetest_thread_data *data = winetest_get_thread_data();
231 // char elapsed[64];
233
234 // winetest_printf( "%s:%d:%s ", data->current_file, data->current_line, winetest_elapsed( elapsed ) );
235 winetest_printf( __winetest_file_line_prefix ": ", data->current_file, data->current_line );
236 va_start( valist, msg );
237 winetest_vprintf( msg, valist );
238 va_end( valist );
239}
240
241static void __cdecl winetest_print_context( const char *msgtype )
242{
243 struct winetest_thread_data *data = winetest_get_thread_data();
244 unsigned int i;
245
246 winetest_print_location( "%s", msgtype );
247 for (i = 0; i < data->context_count; ++i)
248 winetest_printf( "%s: ", data->context[i] );
249}
250
251void winetest_subtest(const char* name)
252{
253 winetest_print_location( "Subtest %s\n", name );
254}
255
256int broken( int condition )
257{
258 return ((strcmp(winetest_platform, "windows") == 0)
259#ifndef USE_WINE_TODOS
260 || (strcmp(winetest_platform, "reactos") == 0)
261#endif
262 ) && condition;
263}
264
265/*
266 * Checks condition.
267 * Parameters:
268 * - condition - condition to check;
269 * - msg test description;
270 * - file - test application source code file name of the check
271 * - line - test application source code file line number of the check
272 * Return:
273 * 0 if condition does not have the expected value, 1 otherwise
274 */
275int winetest_vok( int condition, const char *msg, va_list args )
276{
277 struct winetest_thread_data *data = winetest_get_thread_data();
278
279 if (data->todo_level)
280 {
281 if (condition)
282 {
283 winetest_print_context( "Test succeeded inside todo block: " );
284 winetest_vprintf( msg, args );
285 if ((data->nocount_level & 2) == 0)
286 InterlockedIncrement( &winetest_todo_failures );
287 return 0;
288 }
289 else
290 {
291 /* show todos even if traces are disabled*/
292 /*if (winetest_debug > 0)*/
293 {
294 winetest_print_context( "Test marked todo: " );
295 winetest_vprintf( msg, args );
296 }
297 if ((data->nocount_level & 1) == 0)
298 InterlockedIncrement( &winetest_todo_successes );
299 return 1;
300 }
301 }
302 else
303 {
304 if (!condition)
305 {
306 winetest_print_context( "Test failed: " );
307 winetest_vprintf( msg, args );
308 if ((data->nocount_level & 2) == 0)
309 InterlockedIncrement( &winetest_failures );
310 return 0;
311 }
312 else
313 {
314 if (report_success && (data->nocount_level & 1) == 0)
315 {
316 winetest_print_location("Test succeeded\n");
317 }
318 if ((data->nocount_level & 1) == 0)
319 InterlockedIncrement( &winetest_successes );
320 return 1;
321 }
322 }
323}
324
325void __cdecl winetest_ok( int condition, const char *msg, ... )
326{
328
331 va_end(valist);
332}
333
334void __cdecl winetest_trace( const char *msg, ... )
335{
337
338 if (winetest_debug > 0)
339 {
340 winetest_print_context( "" );
342 winetest_vprintf( msg, valist );
343 va_end(valist);
344 }
345}
346
347void winetest_vskip( const char *msg, va_list args )
348{
349 winetest_print_context( "Tests skipped: " );
350 winetest_vprintf( msg, args );
351 InterlockedIncrement( &winetest_skipped );
352}
353
354void __cdecl winetest_skip( const char *msg, ... )
355{
359 va_end(valist);
360}
361
362void __cdecl winetest_win_skip( const char *msg, ... )
363{
366 if ((strcmp(winetest_platform, "windows") == 0)
367#if !defined(USE_WINE_TODOS) || defined(USE_WIN_SKIP)
368 || (strcmp(winetest_platform, "reactos") == 0)
369#endif
370 )
372 else
374 va_end(valist);
375}
376
377void winetest_start_todo( int is_todo )
378{
379 struct winetest_thread_data *data = winetest_get_thread_data();
380 data->todo_level = (data->todo_level << 1) | (is_todo != 0);
381 data->todo_do_loop=1;
382}
383
384int winetest_loop_todo(void)
385{
386 struct winetest_thread_data *data = winetest_get_thread_data();
387 int do_loop=data->todo_do_loop;
388 data->todo_do_loop=0;
389 return do_loop;
390}
391
392void winetest_end_todo(void)
393{
394 struct winetest_thread_data *data = winetest_get_thread_data();
395 data->todo_level >>= 1;
396}
397
398void winetest_start_nocount(unsigned int flags)
399{
400 struct winetest_thread_data *data = winetest_get_thread_data();
401
402 /* The lowest 2 bits of nocount_level specify whether counting of successes
403 and/or failures is disabled. For each nested level the bits are shifted
404 left, the new lowest 2 bits are copied from the previous state and ored
405 with the new mask. This allows nested handling of both states up tp a
406 level of 16. */
407 flags |= data->nocount_level & 3;
408 data->nocount_level = (data->nocount_level << 2) | flags;
409 data->todo_do_loop = 1;
410}
411
412int winetest_loop_nocount(void)
413{
414 struct winetest_thread_data *data = winetest_get_thread_data();
415 int do_loop = data->todo_do_loop;
416 data->todo_do_loop = 0;
417 return do_loop;
418}
419
420void winetest_end_nocount(void)
421{
422 struct winetest_thread_data *data = winetest_get_thread_data();
423 data->nocount_level >>= 2;
424}
425
426void __cdecl winetest_push_context(const char* fmt, ...)
427{
428 struct winetest_thread_data *data = winetest_get_thread_data();
430
431 if (data->context_count < ARRAY_SIZE(data->context))
432 {
434 vsnprintf(data->context[data->context_count], sizeof(data->context[data->context_count]), fmt, valist);
435 va_end(valist);
436 data->context[data->context_count][sizeof(data->context[data->context_count]) - 1] = 0;
437 }
438 ++data->context_count;
439}
440
441void winetest_pop_context(void)
442{
443 struct winetest_thread_data *data = winetest_get_thread_data();
444
445 if (data->context_count)
446 --data->context_count;
447}
448
449#if 0
450int winetest_get_mainargs( char*** pargv )
451{
452 *pargv = winetest_argv;
453 return winetest_argc;
454}
455#endif
456
458{
459 return winetest_failures;
460}
461
463{
464 return winetest_successes;
465}
466
467void winetest_add_failures( LONG new_failures )
468{
469 while (new_failures-- > 0)
470 InterlockedIncrement( &winetest_failures );
471}
472
473#if 0
474static char *_strdup(const char *str)
475{
476 char* ptr = malloc((strlen(str)+1)*sizeof(char));
477 if (ptr)
478 strcpy(ptr, str);
479 return ptr;
480}
481#endif
482
483/* Initialize testing support */
484static void init_test( const struct test *test )
485{
486 char p[128];
487
488#if 0
489 winetest_argc = __argc;
490 winetest_argv = __argv;
491#endif
492
493 // if (GetEnvironmentVariableA( "WINETEST_PLATFORM", p, sizeof(p) )) winetest_platform = _strdup(p);
494 if (GetEnvironmentVariableA( "WINETEST_DEBUG", p, sizeof(p) )) winetest_debug = atoi(p);
495 if (GetEnvironmentVariableA( "WINETEST_INTERACTIVE", p, sizeof(p) )) winetest_interactive = atoi(p);
496 if (GetEnvironmentVariableA( "WINETEST_REPORT_SUCCESS", p, sizeof(p) )) report_success = atoi(p);
497
499
500 current_test = test;
501 winetest_successes = winetest_failures = winetest_skipped = winetest_todo_successes = winetest_todo_failures = 0;
503}
504
505/* Executed once test is finished: shows results and returns exit status */
506static int fini_test(void)
507{
508 int status;
509 const struct test *test = current_test;
510
511 /* show test results even if traces are disabled */
512 /*if (winetest_debug)*/
513 {
514 //winetest_printf
515 winetest_print_location( "\n%s: %d tests executed (%d marked as todo, %d %s), %d skipped.\n",
516 test->name, (int)(winetest_successes + winetest_failures + winetest_todo_successes + winetest_todo_failures),
517 (int)winetest_todo_successes, (int)(winetest_failures + winetest_todo_failures),
518 (winetest_failures + winetest_todo_failures != 1) ? "failures" : "failure",
519 (int)winetest_skipped );
520 }
521 status = (winetest_failures + winetest_todo_failures < 255) ? winetest_failures + winetest_todo_failures : 255;
522 return status;
523}
524
525#endif /* STANDALONE */
526
527// Some helpful definitions
528
529#define ok_hex_(file, line, expression, result) \
530 do { \
531 int _value = (expression); \
532 int _result = (result); \
533 ok_(file, line)(_value == _result, "Wrong value for '%s', expected: " #result " (0x%x), got: 0x%x\n", \
534 #expression, _result, _value); \
535 } while (0)
536#define ok_hex(expression, result) ok_hex_(__RELFILE__, __LINE__, expression, result)
537
538#define ok_dec_(file, line, expression, result) \
539 do { \
540 int _value = (expression); \
541 int _result = (result); \
542 ok_(file, line)(_value == _result, "Wrong value for '%s', expected: " #result " (%d), got: %d\n", \
543 #expression, _result, _value); \
544 } while (0)
545#define ok_dec(expression, result) ok_dec_(__RELFILE__, __LINE__, expression, result)
546
547#define ok_ptr_(file, line, expression, result) \
548 do { \
549 const void *_value = (expression); \
550 const void *_result = (result); \
551 ok_(file, line)(_value == _result, "Wrong value for '%s', expected: " #result " (%p), got: %p\n", \
552 #expression, _result, _value); \
553 } while (0)
554#define ok_ptr(expression, result) ok_ptr_(__RELFILE__, __LINE__, expression, result)
555
556#define ok_size_t_(file, line, expression, result) \
557 do { \
558 size_t _value = (expression); \
559 size_t _result = (result); \
560 ok_(file, line)(_value == _result, "Wrong value for '%s', expected: " #result " (%Ix), got: %Ix\n", \
561 #expression, _result, _value); \
562 } while (0)
563#define ok_size_t(expression, result) ok_size_t_(__RELFILE__, __LINE__, expression, result)
564
565#define ok_char(expression, result) ok_hex(expression, result)
566
567#define ok_err_(file, line, error) \
568 ok_(file, line)(GetLastError() == (error), "Wrong last error. Expected " #error ", got 0x%lx\n", GetLastError())
569#define ok_err(error) ok_err_(__RELFILE__, __LINE__, error)
570
571#define ok_str_(file, line, x, y) \
572 ok_(file, line)(strcmp(x, y) == 0, "Wrong string. Expected '%s', got '%s'\n", y, x)
573#define ok_str(x, y) ok_str_(__RELFILE__, __LINE__, x, y)
574
575#define ok_wstr_(file, line, x, y) \
576 ok_(file, line)(wcscmp(x, y) == 0, "Wrong string. Expected '%S', got '%S'\n", y, x)
577#define ok_wstr(x, y) ok_wstr_(__RELFILE__, __LINE__, x, y)
578
579#define ok_long(expression, result) ok_hex(expression, result)
580#define ok_int(expression, result) ok_dec(expression, result)
581#define ok_int_(file, line, expression, result) ok_dec_(file, line, expression, result)
582#define ok_ntstatus(status, expected) ok_hex(status, expected)
583#define ok_hdl ok_ptr
584
585#ifdef __cplusplus
586} /* extern "C" */
587#endif
588
589#endif /* __MINI_WINE_TEST_H */
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define __cdecl
Definition: accygwin.h:79
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
#define InterlockedIncrement
Definition: armddk.h:53
#define broken(x)
Definition: atltest.h:178
#define msg(x)
Definition: auth_time.c:54
#define _strdup
Definition: debug_ros.c:7
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
static INT do_loop(const PropSheetInfo *psInfo)
Definition: propsheet.c:2800
#define GetProcessHeap()
Definition: compat.h:736
#define SetLastError(x)
Definition: compat.h:752
#define HeapAlloc
Definition: compat.h:733
#define GetEnvironmentVariableA(x, y, z)
Definition: compat.h:754
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
UINT WINAPI SetErrorMode(IN UINT uMode)
Definition: except.c:751
LPVOID WINAPI TlsGetValue(IN DWORD Index)
Definition: thread.c:1240
BOOL WINAPI TlsSetValue(IN DWORD Index, IN LPVOID Value)
Definition: thread.c:1276
DWORD WINAPI DECLSPEC_HOTPATCH TlsAlloc(void)
Definition: thread.c:657
return ret
Definition: mutex.c:146
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum func
Definition: glext.h:6028
GLsizei const GLchar *const * strings
Definition: glext.h:7622
GLenum condition
Definition: glext.h:9255
GLbitfield flags
Definition: glext.h:7161
GLfloat GLfloat p
Definition: glext.h:8902
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
int winetest_vok(int condition, const char *msg, va_list ap)
void winetest_start_todo(int is_todo)
const char * winetest_platform
int winetest_debug
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
int report_success
void winetest_vskip(const char *msg, va_list ap)
void __cdecl winetest_ok(int condition, const char *msg,...) __WINE_PRINTF_ATTR(2
LONG winetest_get_failures(void)
LONG winetest_get_successes(void)
void __cdecl void __cdecl winetest_skip(const char *msg,...) __WINE_PRINTF_ATTR(1
void winetest_set_location(const char *file, int line)
#define ARRAY_SIZE(x)
Definition: minitest.h:95
void winetest_end_nocount(void)
void __cdecl void __cdecl void __cdecl winetest_win_skip(const char *msg,...) __WINE_PRINTF_ATTR(1
int winetest_interactive
void winetest_start_nocount(unsigned int flags)
void winetest_subtest(const char *name)
void winetest_end_todo(void)
int winetest_loop_nocount(void)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
void __cdecl void __cdecl void __cdecl void __cdecl winetest_trace(const char *msg,...) __WINE_PRINTF_ATTR(1
int winetest_loop_todo(void)
void winetest_add_failures(LONG new_failures)
static PVOID ptr
Definition: dispmode.c:27
static int todo_do_loop
Definition: custom.c:45
#define __WINE_PRINTF_ATTR(fmt, args)
Definition: custom.c:42
static int todo_level
Definition: custom.c:45
static va_list valist
Definition: printf.c:46
#define SEM_FAILCRITICALERRORS
Definition: rtltypes.h:69
#define SEM_NOGPFAULTERRORBOX
Definition: rtltypes.h:70
long LONG
Definition: pedump.c:60
#define test
Definition: rosglue.h:37
const struct test winetest_testlist[]
Definition: testlist.c:7
const WCHAR * str
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
_CRT_RESTORE_GCC_WARNINGS _CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
#define __argv
Definition: stdlib.h:1154
#define __argc
Definition: stdlib.h:1153
strcpy
Definition: string.h:131
void __wine_dbg_set_functions(const struct __wine_debug_functions *new_funcs, struct __wine_debug_functions *old_funcs, size_t size)
Definition: debug.c:540
int winetest_get_mainargs(char ***pargv)
DWORD tls_index
static void init_test(void)
Definition: shlexec.c:2649
TCHAR str_pos[MAX_LOADSTRING]
Definition: sndrec32.cpp:58
int(* dbg_vprintf)(const char *format, va_list args)
Definition: debug.h:158
Definition: match.c:390
Definition: http.c:7252
char * name
Definition: compiler.c:66
Definition: fci.c:127
Definition: dsound.c:943
Definition: parser.c:49
Definition: name.c:39
Definition: ps.c:97
#define vsnprintf
Definition: tif_win32.c:406
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
void int int ULONGLONG int va_list * ap
Definition: winesup.h:36
#define const
Definition: zconf.h:233