From 821e247a6d064e29703c74b21f755baaf4cc1e6e Mon Sep 17 00:00:00 2001 From: Heikki Levanto Date: Wed, 10 May 2006 12:52:17 +0000 Subject: [PATCH] Added a way to get the verbosity to test programs --- include/yaz/test.h | 6 +++++- src/test.c | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/yaz/test.h b/include/yaz/test.h index a40e0f6..c57b197 100644 --- a/include/yaz/test.h +++ b/include/yaz/test.h @@ -2,7 +2,7 @@ * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: test.h,v 1.5 2006-04-20 20:50:51 adam Exp $ + * $Id: test.h,v 1.6 2006-05-10 12:52:17 heikki Exp $ */ /** \file test.h @@ -15,6 +15,9 @@ #include #include +/** \brief Get the verbosity level */ +int yaz_test_get_verbosity(); + /** \brief Test OK */ #define YAZ_TEST_TYPE_OK 1 /** \brief Test failed */ @@ -47,6 +50,7 @@ /** \brief Macro to terminate the system (end of main, normally) */ #define YAZ_CHECK_TERM yaz_check_term1(); return 0 + YAZ_BEGIN_CDECL /** \brief used by macro. Should not be called directly */ YAZ_EXPORT void yaz_check_init1(int *argc, char ***argv); diff --git a/src/test.c b/src/test.c index f6dd704..c7267e3 100644 --- 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. * - * $Id: test.c,v 1.6 2006-04-26 16:58:27 heikki Exp $ + * $Id: test.c,v 1.7 2006-05-10 12:52:28 heikki Exp $ */ /** \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" + " 4=Report + summary + extra prints from tests\n" ); exit(0); } @@ -160,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 -- 1.7.10.4