X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ftest.c;h=f6dd704d311e8c76e89e8e54f370afc2eaf011f2;hb=e70cbdfde382dd605d58fc112cc2458cfce37382;hp=01380566034273c760aa57a80041b6005de9228f;hpb=3086f0e19e38428814c7da92fcaf21eba2bc9a64;p=yaz-moved-to-github.git diff --git a/src/test.c b/src/test.c index 0138056..f6dd704 100644 --- a/src/test.c +++ b/src/test.c @@ -2,8 +2,13 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: test.c,v 1.4 2006-01-30 14:02:07 adam Exp $ + * $Id: test.c,v 1.6 2006-04-26 16:58:27 heikki Exp $ */ + +/** \file test.c + \brief Unit Test for YAZ +*/ + #if HAVE_CONFIG_H #include #endif @@ -123,7 +128,10 @@ void yaz_check_eq1(int type, const char *file, int line, { char formstr[2048]; - sprintf(formstr, "%.500s != %.500s\n%d != %d", left, right, lval, rval); + if (type==YAZ_TEST_TYPE_OK) + sprintf(formstr, "%.500s == %.500s ", left, right); + else + sprintf(formstr, "%.500s != %.500s\n %d != %d", left, right, lval,rval); yaz_check_print1(type, file, line, formstr); } @@ -137,12 +145,12 @@ void yaz_check_print1(int type, const char *file, int line, { case YAZ_TEST_TYPE_FAIL: test_failed++; - msg = "failed"; + msg = "FAILED"; if (test_verbose < 1) return; break; case YAZ_TEST_TYPE_OK: - msg = "OK"; + msg = "ok"; if (test_verbose < 3) return; break;