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