X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Fscan_test.h;fp=functions%2Fstdio%2Fscan_test.h;h=9eae7c879884ee6a42f6c70f53764b75df18c30b;hb=80ab5b6195a66a678d3520b46105282bc32e99b2;hp=0000000000000000000000000000000000000000;hpb=82daa9ec664e8cdd28be7401daf7d88bd56faa48;p=pdclib.old diff --git a/functions/stdio/scan_test.h b/functions/stdio/scan_test.h new file mode 100644 index 0000000..9eae7c8 --- /dev/null +++ b/functions/stdio/scan_test.h @@ -0,0 +1,16 @@ +/* $Id$ */ + +/* scan test header + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +#include +#include + +#define CHECK_TRUE( a ) TESTCASE( a != 0 ) +#define CHECK_FALSE( a ) TESTCASE( a == 0 ) +#define CHECK_EQUAL( a, b ) do { int x = a; int y = b; TESTCASE( x == y ); } while ( 0 ) +#define CHECK_FEQUAL( a, b, T, F ) do { T x = a; T y = b; TESTCASE( x == y ); } while ( 0 ) +