blob: 45ace822f78bb96752acc5f089c793c79d1d3dac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#ifndef _BRANDT_TEST_H
#define _BRANDT_TEST_H
#include <stdio.h>
int tests_run = 0;
int ret = 0;
#define check(cond, message) do { if (!(cond)) { fputs(message, stderr); fputc('\n', stderr); return 0; } } while (0)
#define run(test) do { tests_run++; if (!test()) ret = 1; } while (0)
#endif
|