]> git.gag.com Git - fw/sdcc/blobdiff - support/regression/fwk/include/testfwk.h
Added tests for switch statement and the z80 loop induction problem
[fw/sdcc] / support / regression / fwk / include / testfwk.h
index 54f559c9056326ea4268e9aa0d7f856b3f04d851..4a178514caa950c82ef3959dbcf6be4bb2d28df2 100644 (file)
@@ -4,10 +4,12 @@
 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);
 
@@ -20,4 +22,6 @@ getSuiteName(void);
 
 #define NULL   0
 
+#define UNUSED(_a)     if (_a) { }
+
 #endif