X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Ftest.c;h=01380566034273c760aa57a80041b6005de9228f;hp=967b53b2a28cb99305375291f3cc5a13f40c7fe3;hb=10f391e000230e5a93c768f541a24a379809489e;hpb=06ae818deffa84ec4bc1308051ef411845dd4ce5 diff --git a/src/test.c b/src/test.c index 967b53b..0138056 100644 --- a/src/test.c +++ b/src/test.c @@ -2,7 +2,7 @@ * 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.4 2006-01-30 14:02:07 adam Exp $ */ #if HAVE_CONFIG_H #include @@ -118,7 +118,17 @@ void yaz_check_term1(void) 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"; @@ -137,7 +147,8 @@ void yaz_check_print1(int type, const char *file, int line, const char *expr) 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); }