1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
/* ------------------------------------------------------------------------
@NAME : testlib.h
@DESCRIPTION: Macros and prototypes common to all the btparse test programs.
@CREATED : 1997/09/26, Greg Ward
@MODIFIED :
@VERSION : $Id: testlib.h 7283 2009-05-05 18:07:47Z ambs $
-------------------------------------------------------------------------- */
#ifndef TESTLIB_H
#define TESTLIB_H
#include "btparse.h"
#ifndef DATA_DIR
# define DATA_DIR "btparse/tests/data"
#endif
#define CHECK(cond) \
if (! (cond)) \
{ \
fprintf (stderr, "failed check: %s, at %s line %d\n", \
#cond, __FILE__, __LINE__); \
ok = FALSE; \
}
#define CHECK_ESCAPE(cond,escape,what) \
if (! (cond)) \
{ \
fprintf (stderr, "failed check: %s, at %s line %d\n", \
#cond, __FILE__, __LINE__); \
if (what) \
{ \
fprintf (stderr, "(skipping the rest of this %s)\n", \
what); \
} \
ok = FALSE; \
escape; \
}
FILE *open_file (char *basename, char *dirname, char *filename);
void set_all_stringopts (btshort options);
#endif /* TESTLIB_H */
|