2006-08-18 Aaron Bockover <abockover@novell.com>
[mono.git] / eglib / test / test.h
1 #ifndef _TEST_H
2 #define _TEST_H
3
4 #include <stdarg.h>
5
6 typedef struct _Test Test;
7 typedef struct _Group Group;
8
9 typedef char * (* RunTestHandler)();
10 typedef Test * (* LoadGroupHandler)();
11
12 struct _Test {
13         const char *name;
14         RunTestHandler handler;
15 };
16
17 struct _Group {
18         const char *name;
19         LoadGroupHandler handler;
20 };
21
22 void run_test(Test *test);
23 void run_group(Group *group);
24
25 #define DEFINE_TEST_GROUP_INIT(name, table) \
26         Test * (name)() { return table; }
27
28 #define DEFINE_TEST_GROUP_INIT_H(name) \
29         Test * (name)();
30
31 #define RESULT(x) g_strdup_printf(x);
32
33 #endif /* _TEST_H */
34