]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/test.qh
TEST: improve macro
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / test.qh
index 77e1f52ee8ddca200f90d5d33deed2a155f99263..9173696bf8cde5e2f48693bf3eff921130a8b1f8 100644 (file)
@@ -1,12 +1,12 @@
 #pragma once
 
-#define TEST(id) \
-       void _TEST_##id(); \
+#define TEST(suite, test) \
+       void _TEST_##suite##_##test(); \
        [[accumulate]] int TEST_RunAll_accumulated(int f) { \
-               if (!TEST_Run(#id)) ++f; \
+               if (!TEST_Run(#suite "_" #test)) ++f; \
                return = f; \
        } \
-       void _TEST_##id()
+       void _TEST_##suite##_##test()
 
 #define TEST_Check(cond) MACRO_BEGIN { if (!(cond)) TEST_Fail(#cond); } MACRO_END