]> pd.if.org Git - pdclib/commitdiff
Added.
authorsolar <unknown>
Mon, 21 Nov 2005 18:10:09 +0000 (18:10 +0000)
committersolar <unknown>
Mon, 21 Nov 2005 18:10:09 +0000 (18:10 +0000)
internals/_PDCLIB_test.h [new file with mode: 0644]

diff --git a/internals/_PDCLIB_test.h b/internals/_PDCLIB_test.h
new file mode 100644 (file)
index 0000000..b35c994
--- /dev/null
@@ -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 <stdio.h>
+
+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