Prepare unittest support

This commit is contained in:
momo5502
2024-10-25 17:04:45 +02:00
parent 2c9718ce3f
commit a3a95ec829
14 changed files with 139 additions and 18 deletions

View File

@@ -87,12 +87,12 @@ bool test_io()
return text == buffer;
}
#define RUN_TEST(func, name) \
{ \
#define RUN_TEST(func, name) \
{ \
printf("Running test '" name "': "); \
const auto res = func(); \
valid &= res; \
puts(res ? "Sucess" : "Fail"); \
const auto res = func(); \
valid &= res; \
puts(res ? "Sucess" : "Fail"); \
}
int main(int /*argc*/, const char* /*argv*/[])