2 * Definitions for Wine C unit tests.
4 * Copyright (C) 2002 Alexandre Julliard
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 extern int winetest_debug;
30 /* current platform */
31 extern const char *winetest_platform;
33 typedef int (*winetest_ok_funcptr)( int condition, const char *msg, ...);
34 typedef void (*winetest_trace_funcptr)( const char *msg, ...);
36 extern winetest_ok_funcptr winetest_set_ok_location( const char* file, int line );
37 extern winetest_trace_funcptr winetest_set_trace_location( const char* file, int line );
38 extern void winetest_start_todo( const char* platform );
39 extern int winetest_loop_todo(void);
40 extern void winetest_end_todo( const char* platform );
41 extern int winetest_get_mainargs( char*** pargv );
43 #define START_TEST(name) void func_##name(void)
45 #define ok (*winetest_set_ok_location(__FILE__, __LINE__))
46 #define trace (*winetest_set_trace_location(__FILE__, __LINE__))
48 #define todo(platform) for (winetest_start_todo(platform); \
49 winetest_loop_todo(); \
50 winetest_end_todo(platform))
51 #define todo_wine todo("wine")
53 #endif /* __WINE_TEST_H */