2012-04-12 04:20:26 -07:00
|
|
|
#ifndef _EUNIT_TESTS_H
|
|
|
|
#define _EUNIT_TESTS_H
|
|
|
|
|
|
|
|
#define _EUNIT_EXIT_CODE 1
|
|
|
|
|
|
|
|
#define fail_if(x) \
|
|
|
|
do { \
|
|
|
|
if (x) \
|
|
|
|
{ \
|
2013-01-18 08:13:30 -08:00
|
|
|
fprintf(stderr, "%s:%d - Failure '%s' is TRUE.\n", \
|
2012-04-12 04:20:26 -07:00
|
|
|
__FILE__, __LINE__, # x); \
|
|
|
|
exit(_EUNIT_EXIT_CODE); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|