Cleaned the test programs a bit, used routines in testlib
[idzebra-moved-to-github.git] / test / api / testlib.h
index cc60d2f..c8b928d 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: testlib.h,v 1.1 2004-10-28 10:43:38 heikki Exp $
+/* $Id: testlib.h,v 1.2 2004-10-28 15:24:36 heikki Exp $
    Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
    Index Data Aps
 
@@ -28,7 +28,15 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 
 /** read zebra.cfg from env var srcdir if it exists; otherwise current dir */
-ZebraService start_service();
+ZebraService start_service(char *cfgfile);
+
+/** initialises the zebra base and inserts some test data in it */
+void init_data( ZebraHandle zh, const char **recs);
+
+
+/** makes a query, and compares the number of hits to the expected */
+void Query(int lineno, ZebraHandle zh, char *query, int exphits);
+
 
 /** 
  * makes a query, checks number of hits, and for the first hit, that 
@@ -37,4 +45,3 @@ ZebraService start_service();
 void RankingQuery(int lineno, ZebraHandle zh, char *query, 
            int exphits, char *firstrec, int firstscore );
 
-