projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reformat comments for Doxygen
[yaz-moved-to-github.git]
/
src
/
test.c
diff --git
a/src/test.c
b/src/test.c
index
0138056
..
f6dd704
100644
(file)
--- 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.
*
* 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 <config.h>
#endif
#if HAVE_CONFIG_H
#include <config.h>
#endif
@@
-123,7
+128,10
@@
void yaz_check_eq1(int type, const char *file, int line,
{
char formstr[2048];
{
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);
}
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++;
{
case YAZ_TEST_TYPE_FAIL:
test_failed++;
- msg = "failed";
+ msg = "FAILED";
if (test_verbose < 1)
return;
break;
case YAZ_TEST_TYPE_OK:
if (test_verbose < 1)
return;
break;
case YAZ_TEST_TYPE_OK:
- msg = "OK";
+ msg = "ok";
if (test_verbose < 3)
return;
break;
if (test_verbose < 3)
return;
break;