fix(test): improve testing macros

This commit is contained in:
Squibid 2025-11-15 21:48:41 -05:00
parent 945343daa0
commit edbe9ba3b8
Signed by: squibid
GPG key ID: BECE5684D3C4005D

3
test.c
View file

@ -17,7 +17,8 @@
#define it(message, test) do { \
_tests++; \
if (!(test)) { \
printf("%s %s FAILED\n", _test_name, message); \
printf("%s %s FAILED @ %s:%d\n", _test_name, message, __FILE__, __LINE__); \
printf(" -> test condition: (%s)\n", #test); \
_tests_passed--; \
} \
} while (0)