X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=test%2Fapi%2Ftestlib.c;h=7b7efcaea979265166f733a2edb76d33c5e527bc;hb=1f1106ca4cb980d93dec90480e25df75ddd59c4d;hp=8a32b05d6b72e72c91c8f48346d9633ff27cf280;hpb=f24d7d2fd56ec639ccd0d9c2f9628964ef72c078;p=idzebra-moved-to-github.git diff --git a/test/api/testlib.c b/test/api/testlib.c index 8a32b05..7b7efca 100644 --- a/test/api/testlib.c +++ b/test/api/testlib.c @@ -1,4 +1,4 @@ -/* $Id: testlib.c,v 1.16 2005-05-02 09:05:22 adam Exp $ +/* $Id: testlib.c,v 1.18 2005-05-04 10:50:09 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -139,8 +139,8 @@ void init_data(ZebraHandle zh, const char **recs) } -int do_query_x(int lineno, ZebraHandle zh, char *query, int exphits, - int experror) +int do_query_x(int lineno, ZebraHandle zh, const char *query, zint exphits, + int experror) { ODR odr; YAZ_PQF_Parser parser; @@ -188,7 +188,7 @@ int do_query_x(int lineno, ZebraHandle zh, char *query, int exphits, } if (exphits != -1 && hits != exphits) { printf("Error: search returned " ZINT_FORMAT - " hits instead of %d\n%s\n", + " hits instead of " ZINT_FORMAT "\n%s\n", hits, exphits, query); exit (1); } @@ -198,7 +198,7 @@ int do_query_x(int lineno, ZebraHandle zh, char *query, int exphits, } -int do_query(int lineno, ZebraHandle zh, char *query, int exphits) +int do_query(int lineno, ZebraHandle zh, const char *query, zint exphits) { return do_query_x(lineno, zh, query, exphits, 0); } @@ -304,7 +304,7 @@ void ranking_query(int lineno, ZebraHandle zh, char *query, if (!strstr(retrievalRecord[0].buf, firstrec)) { printf("Error: Got the wrong record first\n"); - printf("Expected '%s' but got \n", firstrec); + printf("Expected '%s' but got\n", firstrec); printf("%.*s\n", retrievalRecord[0].len, retrievalRecord[0].buf); exit(1); } @@ -345,7 +345,7 @@ void meta_query(int lineno, ZebraHandle zh, char *query, int exphits, { if (meta[i].sysno != ids[i]) { - printf("Expected id=" ZINT_FORMAT " but got id=" ZINT_FORMAT, + printf("Expected id=" ZINT_FORMAT " but got id=" ZINT_FORMAT "\n", ids[i], meta[i].sysno); exit(1); }