diff --git a/test/test.hpp b/test/test.hpp index 6c65742..e911b69 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -32,17 +32,19 @@ } #define TEST(name, ...) \ - uint asserts_failed = 0;\ - uint asserts_total = 0;\ - tests_total += 1;\ - std::cout << " RUNNING TEST `" << name << "`\n";\ - __VA_ARGS__\ - std::cout << " PASSED ASSERTS: "\ - << (asserts_failed != 0 ? BG(255, 0, 0) : BG(0, 255, 0))\ - << FG(0, 0, 0)\ - << (asserts_total - asserts_failed) << "/" << asserts_total\ - << RESET\ - << "\n";\ - if (asserts_failed > 0) {\ - tests_failed += 1;\ + {\ + uint asserts_failed = 0;\ + uint asserts_total = 0;\ + tests_total += 1;\ + std::cout << " RUNNING TEST `" << name << "`\n";\ + __VA_ARGS__\ + std::cout << " PASSED ASSERTS: "\ + << (asserts_failed != 0 ? BG(255, 0, 0) : BG(0, 255, 0))\ + << FG(0, 0, 0)\ + << (asserts_total - asserts_failed) << "/" << asserts_total\ + << RESET\ + << "\n";\ + if (asserts_failed > 0) {\ + tests_failed += 1;\ + }\ }