* support/regression/fwk/include/testfwk.h: Fixed up to use function pts correctly.
[fw/sdcc] / support / regression / fwk / include / testfwk.h
index 2e3a721fe2f39d175efbd70d6a3063e9eb937db1..07cfa31fade3859533774e4f01c30cbd8e15072f 100644 (file)
@@ -4,13 +4,17 @@
 extern int __numTests;
 
 void __fail(const char *szMsg, const char *szCond, const char *szFile, int line);
+void __printf(const char *szFormat, ...) REENTRANT;
 
-#define ASSERT(_a) (__numTests++, (_a) ? (void)0 : __fail("Assertion failed", #_a, __FILE__, __LINE__))
+#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 *
@@ -18,4 +22,6 @@ getSuiteName(void);
 
 #define NULL   0
 
+#define UNUSED(_a)     if (_a) { }
+
 #endif