]> pd.if.org Git - pdclib.old/blob - internals/_PDCLIB_test.h
Porting current working set from CVS.
[pdclib.old] / internals / _PDCLIB_test.h
1 /* $Id$ */\r
2 \r
3 /* Release $Name$ */\r
4 \r
5 /* PDCLib testing suite <_PDCLIB_test.h>\r
6 \r
7    This file is part of the Public Domain C Library (PDCLib).\r
8    Permission is granted to use, modify, and / or redistribute at will.\r
9 */\r
10 \r
11 /* -------------------------------------------------------------------------- */\r
12 /* Helper macros for test drivers                                             */\r
13 /* -------------------------------------------------------------------------- */\r
14 \r
15 #include <stdio.h>\r
16 \r
17 char const abcde[] = "abcde";\r
18 char const abcdx[] = "abcdx";\r
19 \r
20 int NO_TESTDRIVER = 0;\r
21 \r
22 //#define BEGIN_TESTS   unsigned int rc = 0\r
23 static unsigned int rc = 0;\r
24 #define TESTCASE( x ) if ( x ) {} \\r
25                       else { rc += 1; printf( "Testcase failed: " __FILE__ ", line %d - " #x "\n", __LINE__ ); }\r
26 #define TEST_RESULTS  rc\r