]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/lib/test.qh
Merge branch 'terencehill/menu_hudskin_selector' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / test.qh
1 #ifndef TEST_H
2 #define TEST_H
3
4 #define TEST(id) \
5         void _TEST_##id(); \
6         [[accumulate]] int TEST_RunAll_accumulated(int f) { \
7                 if (!TEST_Run(#id)) ++f; \
8                 return = f; \
9         } \
10         void _TEST_##id()
11
12 #define TEST_Check(cond) MACRO_BEGIN { if (!(cond)) TEST_Fail(#cond); } MACRO_END
13
14 void TEST_OK();
15 void TEST_Fail(string cond);
16
17 bool TEST_RunAll();
18 bool TEST_Run(string test);
19
20 #endif