put each test in separate scope to avoid redefinition

This commit is contained in:
jacekpoz 2024-04-30 12:18:43 +02:00
parent 5443eeb7b9
commit 39e3b16568
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -32,6 +32,7 @@
} }
#define TEST(name, ...) \ #define TEST(name, ...) \
{\
uint asserts_failed = 0;\ uint asserts_failed = 0;\
uint asserts_total = 0;\ uint asserts_total = 0;\
tests_total += 1;\ tests_total += 1;\
@ -45,4 +46,5 @@
<< "\n";\ << "\n";\
if (asserts_failed > 0) {\ if (asserts_failed > 0) {\
tests_failed += 1;\ tests_failed += 1;\
}\
} }