More Doxygen stuff; for auto-generated code too
[yaz-moved-to-github.git] / src / test.c
index 967b53b..1fc47c2 100644 (file)
@@ -2,8 +2,13 @@
  * 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
@@ -118,7 +123,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 +152,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);
 }