flag to pass throug errors for correcting as many error information as possible.

This commit is contained in:
Takashi Kojo
2018-09-08 06:02:20 +09:00
parent 08c2d94011
commit 294a22e938

View File

@ -32,11 +32,14 @@
#define XABORT() abort()
#endif
static int unit_PassThrough = 0;
#define Fail(description, result) do { \
printf("\nERROR - %s line %d failed with:", __FILE__, __LINE__); \
printf("\n expected: "); printf description; \
printf("\n result: "); printf result; printf("\n\n"); \
XABORT(); \
if(unit_PassThrough == 0)XABORT(); \
} while(0)
#define Assert(test, description, result) if (!(test)) Fail(description, result)