* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: test.c,v 1.3 2006-01-29 21:59:13 adam Exp $
+ * $Id: test.c,v 1.5 2006-04-20 20:50:51 adam Exp $
*/
+
+/** \file test.c
+ \brief Unit Test for YAZ
+*/
+
#if HAVE_CONFIG_H
#include <config.h>
#endif
exit(0);
}
-void yaz_check_print1(int type, const char *file, int line, const char *expr)
+void yaz_check_eq1(int type, const char *file, int line,
+ const char *left, const char *right, int lval, int rval)
+{
+ char formstr[2048];
+
+ sprintf(formstr, "%.500s != %.500s\n%d != %d", left, right, lval, rval);
+ yaz_check_print1(type, file, line, formstr);
+}
+
+void yaz_check_print1(int type, const char *file, int line,
+ const char *expr)
{
const char *msg = "unknown";
return;
break;
}
- fprintf(get_file(), "%s:%d %s: %s\n", file, line, msg, expr);
+ fprintf(get_file(), "%s:%d %s: ", file, line, msg);
+ fprintf(get_file(), "%s\n", expr);
}