Added log methods, added mod test
[fw/sdcc] / support / regression / fwk / include / testfwk.h
1 #ifndef __TESTFWK_H
2 #define __TESTFWK_H 1
3
4 extern int __numTests;
5
6 void __fail(const char *szMsg, const char *szCond, const char *szFile, int line);
7 void __printf(const char *szFormat, ...);
8
9 #define ASSERT(_a)      (__numTests++, (_a) ? (void)0 : __fail("Assertion failed", #_a, __FILE__, __LINE__))
10 #define LOG(_a)         __printf _a
11
12 typedef void TESTFUN(void);
13
14 // Provided by the suite
15 void **
16 suite(void);
17
18 const char *
19 getSuiteName(void);
20
21 #define NULL    0
22
23 #endif