mirror of
https://github.com/samsonjs/lake.git
synced 2026-03-25 08:55:49 +00:00
18 lines
675 B
C
18 lines
675 B
C
#include <stdio.h>
|
|
|
|
#define mu_assert(message, test) do { \
|
|
if (!(test)) { \
|
|
fprintf(stderr, "%s:%d assertion failed\n", __FILE__, __LINE__); \
|
|
return "error: " message; \
|
|
} \
|
|
} while (0)
|
|
|
|
#define mu_run_test(test) do { \
|
|
char *message = test(); \
|
|
tests_run++; \
|
|
if (message) { \
|
|
return message; \
|
|
} \
|
|
} while (0)
|
|
|
|
extern int tests_run;
|