Imported the regression suite
[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
8 #define ASSERT(_a) (__numTests++, (_a) ? (void)0 : __fail("Assertion failed", #_a, __FILE__, __LINE__))
9
10 typedef void TESTFUN(void);
11
12 // Provided by the suite
13 void **
14 suite(void);
15
16 const char *
17 getSuiteName(void);
18
19 #define NULL    0
20
21 #endif