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
Mention docbook-to-man again
[yaz-moved-to-github.git]
/
src
/
test.c
diff --git
a/src/test.c
b/src/test.c
index
1fc47c2
..
c7267e3
100644
(file)
--- a/
src/test.c
+++ b/
src/test.c
@@
-2,7
+2,7
@@
* 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.5 2006-04-20 20:50:51 adam Exp $
+ * $Id: test.c,v 1.7 2006-05-10 12:52:28 heikki Exp $
*/
/** \file test.c
*/
/** \file test.c
@@
-80,6
+80,7
@@
void yaz_check_init1(int *argc_p, char ***argv_p)
" 1=Report+Summary only if tests fail.\n"
" 2=Report failures. Print summary always\n"
" 3=Report + summary always\n"
" 1=Report+Summary only if tests fail.\n"
" 2=Report failures. Print summary always\n"
" 3=Report + summary always\n"
+ " 4=Report + summary + extra prints from tests\n"
);
exit(0);
}
);
exit(0);
}
@@
-128,7
+129,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);
}
@@
-142,12
+146,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;
@@
-157,6
+161,10
@@
void yaz_check_print1(int type, const char *file, int line,
}
}
+int yaz_test_get_verbosity(){
+ return test_verbose;
+}
+
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4