* support/regression/tests/bug1057979.c, support/regression/tests/malloc.c,
[fw/sdcc] / support / regression / fwk / include / testfwk.h
index 29987ba9940c1683ef10816d706d31f476becce8..36a9df0979fc7c8100f439bee10a4f431b6b7d68 100644 (file)
@@ -11,25 +11,14 @@ void __printf(const char *szFormat, ...);
 #define LOG(_a)     /* hollow log */
 #endif
 
-void __fail(const char *szMsg, const char *szCond, const char *szFile, int line);
-void __prints(const char *s);
-void __printn(int n);
-const char *__getSuiteName(void);
-void __runSuite(void);
-
-#define ASSERT(_a)  (__numTests++, (_a) ? (void)0 : __fail("Assertion failed", #_a, __FILE__, __LINE__))
-#define FAIL()      FAILM("Failure")
-#define FAILM(_a)   __fail(_a, #_a, __FILE__, __LINE__)
-
-#define NULL  0
-
-#define UNUSED(_a)  if (_a) { }
-
 #if defined(PORT_HOST) || defined(SDCC_z80) || defined(SDCC_gbz80)
+# define data
 # define idata
 # define pdata
 # define xdata
 # define code
+# define near
+# define far
 # define at(x)
 #endif
 
@@ -43,4 +32,20 @@ void __runSuite(void);
 # define xdata data
 #endif
 
+void __fail(code const char *szMsg, code const char *szCond, code const char *szFile, int line);
+void __prints(const char *s);
+void __printn(int n);
+code const char *__getSuiteName(void);
+void __runSuite(void);
+
+#define ASSERT(_a)  (__numTests++, (_a) ? (void)0 : __fail("Assertion failed", #_a, __FILE__, __LINE__))
+#define FAIL()      FAILM("Failure")
+#define FAILM(_a)   __fail(_a, #_a, __FILE__, __LINE__)
+
+#ifndef NULL
+#define NULL  0
 #endif
+
+#define UNUSED(_a)  if (_a) { }
+
+#endif //__TESTFWK_H