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