X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=support%2Fregression%2Ffwk%2Finclude%2Ftestfwk.h;h=07cfa31fade3859533774e4f01c30cbd8e15072f;hb=f4259cdc176cd73028cd62fe411bff29b32b941b;hp=54f559c9056326ea4268e9aa0d7f856b3f04d851;hpb=81d1bf22460fdc85ca5b000820079c3d055cb864;p=fw%2Fsdcc diff --git a/support/regression/fwk/include/testfwk.h b/support/regression/fwk/include/testfwk.h index 54f559c9..07cfa31f 100644 --- a/support/regression/fwk/include/testfwk.h +++ b/support/regression/fwk/include/testfwk.h @@ -4,15 +4,17 @@ extern int __numTests; void __fail(const char *szMsg, const char *szCond, const char *szFile, int line); -void __printf(const char *szFormat, ...); +void __printf(const char *szFormat, ...) REENTRANT; #define ASSERT(_a) (__numTests++, (_a) ? (void)0 : __fail("Assertion failed", #_a, __FILE__, __LINE__)) #define LOG(_a) __printf _a +#define FAIL() FAILM("Failure") +#define FAILM(_a) __fail(_a, #_a, __FILE__, __LINE__) -typedef void TESTFUN(void); +typedef void (*TESTFUNP)(void); // Provided by the suite -void ** +TESTFUNP * suite(void); const char * @@ -20,4 +22,6 @@ getSuiteName(void); #define NULL 0 +#define UNUSED(_a) if (_a) { } + #endif