From 2777a04ed2ba4fd36138b991d66a32a283361f7e Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 1 May 2008 16:34:46 +0000 Subject: Import parser construction utility library svn path=/trunk/libparserutils/; revision=4111 --- test/parserutils.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test/parserutils.c (limited to 'test/parserutils.c') diff --git a/test/parserutils.c b/test/parserutils.c new file mode 100644 index 0000000..c6d671a --- /dev/null +++ b/test/parserutils.c @@ -0,0 +1,30 @@ +#include +#include + +#include + +#include "testutils.h" + +static void *myrealloc(void *ptr, size_t len, void *pw) +{ + UNUSED(pw); + + return realloc(ptr, len); +} + +int main(int argc, char **argv) +{ + if (argc != 2) { + printf("Usage: %s \n", argv[0]); + return 1; + } + + assert(parserutils_initialise(argv[1], myrealloc, NULL) == + PARSERUTILS_OK); + + assert (parserutils_finalise(myrealloc, NULL) == PARSERUTILS_OK); + + printf("PASS\n"); + + return 0; +} -- cgit v1.2.3