18 lines
325 B
C
18 lines
325 B
C
|
#ifndef _EUNIT_TESTS_H
|
||
|
#define _EUNIT_TESTS_H
|
||
|
|
||
|
#define _EUNIT_EXIT_CODE 1
|
||
|
|
||
|
#define fail_if(x) \
|
||
|
do { \
|
||
|
if (x) \
|
||
|
{ \
|
||
|
fprintf(stderr, "%s:%d - Failure '%s' is TRUE.", \
|
||
|
__FILE__, __LINE__, # x); \
|
||
|
exit(_EUNIT_EXIT_CODE); \
|
||
|
} \
|
||
|
} while (0)
|
||
|
|
||
|
#endif
|
||
|
|