From 086e8411103b26e18a012d148ac2201bba91a487 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Sun, 28 Apr 2024 18:52:13 +0200 Subject: [PATCH] make the test name a string this is to avoid treesitter shitting itself --- test/example.cpp | 2 +- test/test.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/example.cpp b/test/example.cpp index bc5c678..04c47df 100644 --- a/test/example.cpp +++ b/test/example.cpp @@ -1,7 +1,7 @@ #include TEST_START() - TEST(tests work, + TEST("tests work", assert(1 == 1, "c++ broke") assert(1 != 0, "c++ broke #2") ) diff --git a/test/test.hpp b/test/test.hpp index e37f18d..6c65742 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -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))\