make the test name a string

this is to avoid treesitter shitting itself
This commit is contained in:
jacekpoz 2024-04-28 18:52:13 +02:00
parent 119a024045
commit 086e841110
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8
2 changed files with 2 additions and 2 deletions

View file

@ -1,7 +1,7 @@
#include <test.hpp>
TEST_START()
TEST(tests work,
TEST("tests work",
assert(1 == 1, "c++ broke")
assert(1 != 0, "c++ broke #2")
)

View file

@ -35,7 +35,7 @@
uint asserts_failed = 0;\
uint asserts_total = 0;\
tests_total += 1;\
std::cout << " RUNNING TEST `" << #name << "`\n";\
std::cout << " RUNNING TEST `" << name << "`\n";\
__VA_ARGS__\
std::cout << " PASSED ASSERTS: "\
<< (asserts_failed != 0 ? BG(255, 0, 0) : BG(0, 255, 0))\