diff --git a/tests/UnitTest.h b/tests/UnitTest.h new file mode 100644 index 0000000..fe22dd2 --- /dev/null +++ b/tests/UnitTest.h @@ -0,0 +1,14 @@ +#ifndef TELODENDRIA_UNITTEST_H +#define TELODENDRIA_UNITTEST_H + +#include +#include + +#define TEST(body) int main(void) { body; return 0; } + +#define ASSERT(condition) if (!(condition)) { \ + printf("%s:%d: Assertion failed: %s\n", __FILE__, __LINE__, #condition); \ + exit(1); \ +} + +#endif