[WINE]
[reactos.git] / reactos / include / reactos / wine / test.h
1 /*
2 * Definitions for Wine C unit tests.
3 *
4 * Copyright (C) 2002 Alexandre Julliard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21 #ifndef __WINE_WINE_TEST_H
22 #define __WINE_WINE_TEST_H
23
24 #include <stdarg.h>
25 #include <stdlib.h>
26 #include <windef.h>
27 #include <winbase.h>
28
29 #ifdef __WINE_CONFIG_H
30 #error config.h should not be used in Wine tests
31 #endif
32 #ifdef __WINE_WINE_LIBRARY_H
33 #error wine/library.h should not be used in Wine tests
34 #endif
35 #ifdef __WINE_WINE_UNICODE_H
36 #error wine/unicode.h should not be used in Wine tests
37 #endif
38 #ifdef __WINE_WINE_DEBUG_H
39 #error wine/debug.h should not be used in Wine tests
40 #endif
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45
46 #ifndef INVALID_FILE_ATTRIBUTES
47 #define INVALID_FILE_ATTRIBUTES (~0u)
48 #endif
49 #ifndef INVALID_SET_FILE_POINTER
50 #define INVALID_SET_FILE_POINTER (~0u)
51 #endif
52
53 /* debug level */
54 extern int winetest_debug;
55
56 /* running in interactive mode? */
57 extern int winetest_interactive;
58
59 /* current platform */
60 extern const char *winetest_platform;
61
62 extern void winetest_set_location( const char* file, int line );
63 extern void winetest_start_todo( const char* platform );
64 extern int winetest_loop_todo(void);
65 extern void winetest_end_todo( const char* platform );
66 extern int winetest_get_mainargs( char*** pargv );
67 extern LONG winetest_get_failures(void);
68 extern void winetest_add_failures( LONG new_failures );
69 extern void winetest_wait_child_process( HANDLE process );
70
71 extern const char *wine_dbgstr_wn( const WCHAR *str, intptr_t n );
72 extern const char *wine_dbgstr_guid( const GUID *guid );
73 static inline const char *wine_dbgstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); }
74
75 /* strcmpW is available for tests compiled under Wine, but not in standalone
76 * builds under Windows, so we reimplement it under a different name. */
77 static inline int winetest_strcmpW( const WCHAR *str1, const WCHAR *str2 )
78 {
79 while (*str1 && (*str1 == *str2)) { str1++; str2++; }
80 return *str1 - *str2;
81 }
82
83 #ifdef STANDALONE
84
85 #define START_TEST(name) \
86 static void func_##name(void); \
87 const struct test winetest_testlist[] = { { #name, func_##name }, { 0, 0 } }; \
88 static void func_##name(void)
89
90 #else /* STANDALONE */
91
92 #ifdef __cplusplus
93 #define START_TEST(name) extern "C" void func_##name(void)
94 #else
95 #define START_TEST(name) void func_##name(void)
96 #endif
97
98 #endif /* STANDALONE */
99
100 #if defined(__x86_64__) && defined(__GNUC__) && defined(__WINE_USE_MSVCRT)
101 #define __winetest_cdecl __cdecl
102 #define __winetest_va_list __builtin_ms_va_list
103 #else
104 #define __winetest_cdecl
105 #define __winetest_va_list va_list
106 #endif
107
108 extern int broken( int condition );
109 extern int winetest_vok( int condition, const char *msg, __winetest_va_list ap );
110 extern void winetest_vskip( const char *msg, __winetest_va_list ap );
111
112 #ifdef __GNUC__
113
114 extern void __winetest_cdecl winetest_ok( int condition, const char *msg, ... ) __attribute__((format (printf,2,3) ));
115 extern void __winetest_cdecl winetest_skip( const char *msg, ... ) __attribute__((format (printf,1,2)));
116 extern void __winetest_cdecl winetest_win_skip( const char *msg, ... ) __attribute__((format (printf,1,2)));
117 extern void __winetest_cdecl winetest_trace( const char *msg, ... ) __attribute__((format (printf,1,2)));
118
119 #else /* __GNUC__ */
120
121 extern void __winetest_cdecl winetest_ok( int condition, const char *msg, ... );
122 extern void __winetest_cdecl winetest_skip( const char *msg, ... );
123 extern void __winetest_cdecl winetest_win_skip( const char *msg, ... );
124 extern void __winetest_cdecl winetest_trace( const char *msg, ... );
125
126 #endif /* __GNUC__ */
127
128 #define ok_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_ok
129 #define skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_skip
130 #define win_skip_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_win_skip
131 #define trace_(file, line) (winetest_set_location(file, line), 0) ? (void)0 : winetest_trace
132
133 #define ok ok_(__FILE__, __LINE__)
134 #define skip skip_(__FILE__, __LINE__)
135 #define win_skip win_skip_(__FILE__, __LINE__)
136 #define trace trace_(__FILE__, __LINE__)
137
138 #define todo(platform) for (winetest_start_todo(platform); \
139 winetest_loop_todo(); \
140 winetest_end_todo(platform))
141
142 #define todo_ros todo("reactos")
143 #ifdef USE_WINE_TODOS
144 #define todo_wine todo_ros
145 #else
146 #define todo_wine todo("wine")
147 #endif
148
149
150 #ifdef NONAMELESSUNION
151 # define U(x) (x).u
152 # define U1(x) (x).u1
153 # define U2(x) (x).u2
154 # define U3(x) (x).u3
155 # define U4(x) (x).u4
156 # define U5(x) (x).u5
157 # define U6(x) (x).u6
158 # define U7(x) (x).u7
159 # define U8(x) (x).u8
160 #else
161 # define U(x) (x)
162 # define U1(x) (x)
163 # define U2(x) (x)
164 # define U3(x) (x)
165 # define U4(x) (x)
166 # define U5(x) (x)
167 # define U6(x) (x)
168 # define U7(x) (x)
169 # define U8(x) (x)
170 #endif
171
172 #ifdef NONAMELESSSTRUCT
173 # define S(x) (x).s
174 # define S1(x) (x).s1
175 # define S2(x) (x).s2
176 # define S3(x) (x).s3
177 # define S4(x) (x).s4
178 # define S5(x) (x).s5
179 #else
180 # define S(x) (x)
181 # define S1(x) (x)
182 # define S2(x) (x)
183 # define S3(x) (x)
184 # define S4(x) (x)
185 # define S5(x) (x)
186 #endif
187
188
189 /************************************************************************/
190 /* Below is the implementation of the various functions, to be included
191 * directly into the generated testlist.c file.
192 * It is done that way so that the dlls can build the test routines with
193 * different includes or flags if needed.
194 */
195
196 #ifdef STANDALONE
197
198 #include <stdio.h>
199
200 #if defined(__x86_64__) && defined(__GNUC__) && defined(__WINE_USE_MSVCRT)
201 # define __winetest_va_start(list,arg) __builtin_ms_va_start(list,arg)
202 # define __winetest_va_end(list) __builtin_ms_va_end(list)
203 #else
204 # define __winetest_va_start(list,arg) va_start(list,arg)
205 # define __winetest_va_end(list) va_end(list)
206 #endif
207
208 /* Define WINETEST_MSVC_IDE_FORMATTING to alter the output format winetest will use for file/line numbers.
209 This alternate format makes the file/line numbers clickable in visual studio, to directly jump to them. */
210 #if defined(WINETEST_MSVC_IDE_FORMATTING)
211 # define __winetest_file_line_prefix "%s(%d)"
212 #else
213 # define __winetest_file_line_prefix "%s:%d"
214 #endif
215
216 struct test
217 {
218 const char *name;
219 void (*func)(void);
220 };
221
222 extern const struct test winetest_testlist[];
223
224 /* debug level */
225 int winetest_debug = 1;
226
227 /* interactive mode? */
228 int winetest_interactive = 0;
229
230 /* current platform */
231 const char *winetest_platform = "windows";
232
233 /* report successful tests (BOOL) */
234 static int report_success = 0;
235
236 /* passing arguments around */
237 static int winetest_argc;
238 static char** winetest_argv;
239
240 static const struct test *current_test; /* test currently being run */
241
242 static LONG successes; /* number of successful tests */
243 static LONG failures; /* number of failures */
244 static LONG skipped; /* number of skipped test chunks */
245 static LONG todo_successes; /* number of successful tests inside todo block */
246 static LONG todo_failures; /* number of failures inside todo block */
247
248 /* The following data must be kept track of on a per-thread basis */
249 typedef struct
250 {
251 const char* current_file; /* file of current check */
252 int current_line; /* line of current check */
253 int todo_level; /* current todo nesting level */
254 int todo_do_loop;
255 char *str_pos; /* position in debug buffer */
256 char strings[2000]; /* buffer for debug strings */
257 } tls_data;
258 static DWORD tls_index;
259
260 static tls_data* get_tls_data(void)
261 {
262 tls_data* data;
263 DWORD last_error;
264
265 last_error=GetLastError();
266 data=(tls_data*)TlsGetValue(tls_index);
267 if (!data)
268 {
269 data=(tls_data*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(tls_data));
270 data->str_pos = data->strings;
271 TlsSetValue(tls_index,data);
272 }
273 SetLastError(last_error);
274 return data;
275 }
276
277 /* allocate some tmp space for a string */
278 static char *get_temp_buffer( size_t n )
279 {
280 tls_data *data = get_tls_data();
281 char *res = data->str_pos;
282
283 if (res + n >= &data->strings[sizeof(data->strings)]) res = data->strings;
284 data->str_pos = res + n;
285 return res;
286 }
287
288 /* release extra space that we requested in gimme1() */
289 static void release_temp_buffer( char *ptr, size_t size )
290 {
291 tls_data *data = get_tls_data();
292 data->str_pos = ptr + size;
293 }
294
295 static void exit_process( int code )
296 {
297 fflush( stdout );
298 ExitProcess( code );
299 }
300
301
302 void winetest_set_location( const char* file, int line )
303 {
304 tls_data* data=get_tls_data();
305 #if defined(WINETEST_MSVC_IDE_FORMATTING)
306 data->current_file = file;
307 #else
308 data->current_file=strrchr(file,'/');
309 if (data->current_file==NULL)
310 data->current_file=strrchr(file,'\\');
311 if (data->current_file==NULL)
312 data->current_file=file;
313 else
314 data->current_file++;
315 #endif
316 data->current_line=line;
317 }
318
319 int broken( int condition )
320 {
321 return ((strcmp(winetest_platform, "windows") == 0)
322 #ifndef USE_WINE_TODOS
323 || (strcmp(winetest_platform, "reactos") == 0)
324 #endif
325 ) && condition;
326 }
327
328 /*
329 * Checks condition.
330 * Parameters:
331 * - condition - condition to check;
332 * - msg test description;
333 * - file - test application source code file name of the check
334 * - line - test application source code file line number of the check
335 * Return:
336 * 0 if condition does not have the expected value, 1 otherwise
337 */
338 int winetest_vok( int condition, const char *msg, __winetest_va_list args )
339 {
340 tls_data* data=get_tls_data();
341
342 if (data->todo_level)
343 {
344 if (condition)
345 {
346 fprintf( stdout, __winetest_file_line_prefix ": Test succeeded inside todo block: ",
347 data->current_file, data->current_line );
348 vfprintf(stdout, msg, args);
349 InterlockedIncrement(&todo_failures);
350 return 0;
351 }
352 else
353 {
354 /* show todos even if traces are disabled*/
355 /*if (winetest_debug > 0)*/
356 {
357 fprintf( stdout, __winetest_file_line_prefix ": Test marked todo: ",
358 data->current_file, data->current_line );
359 vfprintf(stdout, msg, args);
360 }
361 InterlockedIncrement(&todo_successes);
362 return 1;
363 }
364 }
365 else
366 {
367 if (!condition)
368 {
369 fprintf( stdout, __winetest_file_line_prefix ": Test failed: ",
370 data->current_file, data->current_line );
371 vfprintf(stdout, msg, args);
372 InterlockedIncrement(&failures);
373 return 0;
374 }
375 else
376 {
377 if (report_success)
378 fprintf( stdout, __winetest_file_line_prefix ": Test succeeded\n",
379 data->current_file, data->current_line);
380 InterlockedIncrement(&successes);
381 return 1;
382 }
383 }
384 }
385
386 void __winetest_cdecl winetest_ok( int condition, const char *msg, ... )
387 {
388 __winetest_va_list valist;
389
390 __winetest_va_start(valist, msg);
391 winetest_vok(condition, msg, valist);
392 __winetest_va_end(valist);
393 }
394
395 void __winetest_cdecl winetest_trace( const char *msg, ... )
396 {
397 __winetest_va_list valist;
398 tls_data* data=get_tls_data();
399
400 if (winetest_debug > 0)
401 {
402 fprintf( stdout, __winetest_file_line_prefix ": ", data->current_file, data->current_line );
403 __winetest_va_start(valist, msg);
404 vfprintf(stdout, msg, valist);
405 __winetest_va_end(valist);
406 }
407 }
408
409 void winetest_vskip( const char *msg, __winetest_va_list args )
410 {
411 tls_data* data=get_tls_data();
412
413 fprintf( stdout, __winetest_file_line_prefix ": Tests skipped: ", data->current_file, data->current_line );
414 vfprintf(stdout, msg, args);
415 skipped++;
416 }
417
418 void __winetest_cdecl winetest_skip( const char *msg, ... )
419 {
420 __winetest_va_list valist;
421 __winetest_va_start(valist, msg);
422 winetest_vskip(msg, valist);
423 __winetest_va_end(valist);
424 }
425
426 void __winetest_cdecl winetest_win_skip( const char *msg, ... )
427 {
428 __winetest_va_list valist;
429 __winetest_va_start(valist, msg);
430 if ((strcmp(winetest_platform, "windows") == 0)
431 #ifndef USE_WINE_TODOS
432 || (strcmp(winetest_platform, "reactos") == 0)
433 #endif
434 )
435 winetest_vskip(msg, valist);
436 else
437 winetest_vok(0, msg, valist);
438 __winetest_va_end(valist);
439 }
440
441 void winetest_start_todo( const char* platform )
442 {
443 tls_data* data=get_tls_data();
444 if (strcmp(winetest_platform,platform)==0)
445 data->todo_level++;
446 data->todo_do_loop=1;
447 }
448
449 int winetest_loop_todo(void)
450 {
451 tls_data* data=get_tls_data();
452 int do_loop=data->todo_do_loop;
453 data->todo_do_loop=0;
454 return do_loop;
455 }
456
457 void winetest_end_todo( const char* platform )
458 {
459 if (strcmp(winetest_platform,platform)==0)
460 {
461 tls_data* data=get_tls_data();
462 data->todo_level--;
463 }
464 }
465
466 int winetest_get_mainargs( char*** pargv )
467 {
468 *pargv = winetest_argv;
469 return winetest_argc;
470 }
471
472 LONG winetest_get_failures(void)
473 {
474 return failures;
475 }
476
477 void winetest_add_failures( LONG new_failures )
478 {
479 while (new_failures-- > 0)
480 InterlockedIncrement( &failures );
481 }
482
483 void winetest_wait_child_process( HANDLE process )
484 {
485 DWORD exit_code = 1;
486
487 if (WaitForSingleObject( process, 30000 ))
488 fprintf( stdout, "%s: child process wait failed\n", current_test->name );
489 else
490 GetExitCodeProcess( process, &exit_code );
491
492 if (exit_code)
493 {
494 if (exit_code > 255)
495 {
496 fprintf( stdout, "%s: exception 0x%08x in child process\n", current_test->name, (unsigned)exit_code );
497 InterlockedIncrement( &failures );
498 }
499 else
500 {
501 fprintf( stdout, "%s: %u failures in child process\n",
502 current_test->name, (unsigned)exit_code );
503 while (exit_code-- > 0)
504 InterlockedIncrement(&failures);
505 }
506 }
507 }
508
509 const char *wine_dbgstr_wn( const WCHAR *str, intptr_t n )
510 {
511 char *dst, *res;
512 size_t size;
513
514 if (!((ULONG_PTR)str >> 16))
515 {
516 if (!str) return "(null)";
517 res = get_temp_buffer( 6 );
518 sprintf( res, "#%04x", LOWORD(str) );
519 return res;
520 }
521 if (n == -1)
522 {
523 const WCHAR *end = str;
524 while (*end) end++;
525 n = end - str;
526 }
527 if (n < 0) n = 0;
528 size = 12 + min( 300, n * 5 );
529 dst = res = get_temp_buffer( size );
530 *dst++ = 'L';
531 *dst++ = '"';
532 while (n-- > 0 && dst <= res + size - 10)
533 {
534 WCHAR c = *str++;
535 switch (c)
536 {
537 case '\n': *dst++ = '\\'; *dst++ = 'n'; break;
538 case '\r': *dst++ = '\\'; *dst++ = 'r'; break;
539 case '\t': *dst++ = '\\'; *dst++ = 't'; break;
540 case '"': *dst++ = '\\'; *dst++ = '"'; break;
541 case '\\': *dst++ = '\\'; *dst++ = '\\'; break;
542 default:
543 if (c >= ' ' && c <= 126)
544 *dst++ = (char)c;
545 else
546 {
547 *dst++ = '\\';
548 sprintf(dst,"%04x",c);
549 dst+=4;
550 }
551 }
552 }
553 *dst++ = '"';
554 if (n > 0)
555 {
556 *dst++ = '.';
557 *dst++ = '.';
558 *dst++ = '.';
559 }
560 *dst++ = 0;
561 release_temp_buffer( res, dst - res );
562 return res;
563 }
564
565 const char *wine_dbgstr_guid( const GUID *guid )
566 {
567 char *res;
568
569 if (!guid) return "(null)";
570 res = get_temp_buffer( 39 ); /* CHARS_IN_GUID */
571 sprintf( res, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
572 guid->Data1, guid->Data2, guid->Data3, guid->Data4[0],
573 guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4],
574 guid->Data4[5], guid->Data4[6], guid->Data4[7] );
575 return res;
576 }
577
578 /* Find a test by name */
579 static const struct test *find_test( const char *name )
580 {
581 const struct test *test;
582 const char *p;
583 size_t len;
584
585 if ((p = strrchr( name, '/' ))) name = p + 1;
586 if ((p = strrchr( name, '\\' ))) name = p + 1;
587 len = strlen(name);
588 if (len > 2 && !strcmp( name + len - 2, ".c" )) len -= 2;
589
590 for (test = winetest_testlist; test->name; test++)
591 {
592 if (!strncmp( test->name, name, len ) && !test->name[len]) break;
593 }
594 return test->name ? test : NULL;
595 }
596
597
598 /* Display list of valid tests */
599 static void list_tests(void)
600 {
601 const struct test *test;
602
603 fprintf( stdout, "Valid test names:\n" );
604 for (test = winetest_testlist; test->name; test++) fprintf( stdout, " %s\n", test->name );
605 }
606
607 /* Disable false-positive claiming "test" would be NULL-dereferenced */
608 #if defined(_MSC_VER)
609 #pragma warning(push)
610 #pragma warning(disable:28182)
611 #endif
612
613 /* Run a named test, and return exit status */
614 static int run_test( const char *name )
615 {
616 const struct test *test;
617 int status;
618
619 if (!(test = find_test( name )))
620 {
621 fprintf( stdout, "Fatal: test '%s' does not exist.\n", name );
622 exit_process(1);
623 }
624 successes = failures = todo_successes = todo_failures = 0;
625 tls_index=TlsAlloc();
626 current_test = test;
627 test->func();
628
629 /* show test results even if traces are disabled */
630 /*if (winetest_debug)*/
631 {
632 fprintf( stdout, "\n%s: %d tests executed (%d marked as todo, %d %s), %d skipped.\n",
633 test->name, (int)(successes + failures + todo_successes + todo_failures),
634 (int)todo_successes, (int)(failures + todo_failures),
635 (failures + todo_failures != 1) ? "failures" : "failure",
636 (int)skipped );
637 }
638 status = (failures + todo_failures < 255) ? failures + todo_failures : 255;
639 return status;
640 }
641
642 #if defined(_MSC_VER)
643 #pragma warning(pop)
644 #endif
645
646 /* Display usage and exit */
647 static void usage( const char *argv0 )
648 {
649 fprintf( stdout, "Usage: %s test_name\n\n", argv0 );
650 list_tests();
651 exit_process(1);
652 }
653
654
655 /* main function */
656 int main( int argc, char **argv )
657 {
658 char p[128];
659
660 setvbuf (stdout, NULL, _IONBF, 0);
661
662 winetest_argc = argc;
663 winetest_argv = argv;
664
665 if (GetEnvironmentVariableA( "WINETEST_PLATFORM", p, sizeof(p) )) winetest_platform = _strdup(p);
666 if (GetEnvironmentVariableA( "WINETEST_DEBUG", p, sizeof(p) )) winetest_debug = atoi(p);
667 if (GetEnvironmentVariableA( "WINETEST_INTERACTIVE", p, sizeof(p) )) winetest_interactive = atoi(p);
668 if (GetEnvironmentVariableA( "WINETEST_REPORT_SUCCESS", p, sizeof(p) )) report_success = atoi(p);
669
670 if (!winetest_interactive) SetErrorMode( SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX );
671
672 if (!argv[1])
673 {
674 if (winetest_testlist[0].name && !winetest_testlist[1].name) /* only one test */
675 return run_test( winetest_testlist[0].name );
676 usage( argv[0] );
677 }
678 if (!strcmp( argv[1], "--list" ))
679 {
680 list_tests();
681 return 0;
682 }
683 return run_test(argv[1]);
684 }
685
686 #endif /* STANDALONE */
687
688 // hack for ntdll winetest (this is defined in excpt.h)
689 #undef exception_info
690
691 // Some helpful definitions
692
693 #define ok_hex(expression, result) \
694 do { \
695 int _value = (expression); \
696 ok(_value == (result), "Wrong value for '%s', expected: " #result " (0x%x), got: 0x%x\n", \
697 #expression, (int)(result), _value); \
698 } while (0)
699
700 #define ok_dec(expression, result) \
701 do { \
702 int _value = (expression); \
703 ok(_value == (result), "Wrong value for '%s', expected: " #result " (%d), got: %d\n", \
704 #expression, (int)(result), _value); \
705 } while (0)
706
707 #define ok_ptr(expression, result) \
708 do { \
709 void *_value = (expression); \
710 ok(_value == (result), "Wrong value for '%s', expected: " #result " (%p), got: %p\n", \
711 #expression, (void*)(result), _value); \
712 } while (0)
713
714 #define ok_size_t(expression, result) \
715 do { \
716 size_t _value = (expression); \
717 ok(_value == (result), "Wrong value for '%s', expected: " #result " (%Ix), got: %Ix\n", \
718 #expression, (size_t)(result), _value); \
719 } while (0)
720
721 #define ok_char(expression, result) ok_hex(expression, result)
722
723 #define ok_err(error) \
724 ok(GetLastError() == (error), "Wrong last error. Expected " #error ", got 0x%lx\n", GetLastError())
725
726 #define ok_str(x, y) \
727 ok(strcmp(x, y) == 0, "Wrong string. Expected '%s', got '%s'\n", y, x)
728
729 #define ok_wstr(x, y) \
730 ok(wcscmp(x, y) == 0, "Wrong string. Expected '%S', got '%S'\n", y, x)
731
732 #define ok_long(expression, result) ok_hex(expression, result)
733 #define ok_int(expression, result) ok_dec(expression, result)
734 #define ok_ntstatus(status, expected) ok_hex(status, expected)
735 #define ok_hdl ok_ptr
736
737 #ifdef __cplusplus
738 } /* extern "C" */
739 #endif
740
741 #endif /* __WINE_WINE_TEST_H */