c-uebungen/Assignment_022/solution/minitest.h

9 lines
373 B
C
Raw Permalink Normal View History

2023-05-21 21:10:46 +02:00
#ifndef MINITEST_H
#define MINITEST_H
#define mu_in_delta(a, b, delta) (((a) >= ((b) - (delta))) && ((a) <= ((b) + (delta))))
#define mu_assert(message, test) do { if (!(test)) return message; } while (0)
#define mu_run_test(test) do { char *message = test(); tests_run++; \
if (message) return message; } while (0)
#endif /* MINITEST_H */