From: solar Date: Mon, 21 Nov 2005 18:10:09 +0000 (+0000) Subject: Added. X-Git-Tag: v0.3~1 X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=9e0b2e2cab548bd463cc5c262e7dabbddd884292 Added. --- diff --git a/internals/_PDCLIB_test.h b/internals/_PDCLIB_test.h new file mode 100644 index 0000000..b35c994 --- /dev/null +++ b/internals/_PDCLIB_test.h @@ -0,0 +1,23 @@ +/* $Id$ */ + +/* Release $Name$ */ + +/* PDCLib testing suite <_PDCLIB_test.h> + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +/* -------------------------------------------------------------------------- */ +/* Helper macros for test drivers */ +/* -------------------------------------------------------------------------- */ + +#include + +char const abcde[] = "abcde"; +char const abcdx[] = "abcdx"; + +#define BEGIN_TESTS unsigned int rc = 0 +#define TESTCASE( x ) if ( x ) {} \ + else { rc += 1; printf( "Testcase failed: " __FILE__ " - " #x "\n" ); } +#define TEST_RESULTS rc