blob: 1688add3390a395345b747e9db159d417e80baf2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#ifndef INC_BINDFS_TEST_COMMON_H
#define INC_BINDFS_TEST_COMMON_H
#include <stdio.h>
#include <math.h>
extern int failures;
#define TEST_ASSERT(expr) do { if (!(expr)) { printf("Assertion failed: %s:%d: `%s'\n", __FILE__, __LINE__, #expr); ++failures; } } while (0);
#define NEAR(a, b, eps) (fabs((a) - (b)) < (eps))
int run_suite(void (*suite)());
#define TEST_MAIN(suite) int main() { return run_suite(suite); }
#endif
|