1 |
/* |
2 |
* CUnit - A Unit testing framework library for C. |
3 |
* Copyright (C) 2004, 2005 Jerry St.Clair |
4 |
* |
5 |
* This library is free software; you can redistribute it and/or |
6 |
* modify it under the terms of the GNU Library General Public |
7 |
* License as published by the Free Software Foundation; either |
8 |
* version 2 of the License, or (at your option) any later version. |
9 |
* |
10 |
* This library is distributed in the hope that it will be useful, |
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 |
* Library General Public License for more details. |
14 |
* |
15 |
* You should have received a copy of the GNU Library General Public |
16 |
* License along with this library; if not, write to the Free Software |
17 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 |
*/ |
19 |
|
20 |
/* |
21 |
* Interface for simple test runner. |
22 |
* |
23 |
* Created By : Jerry St.Clair (11-Aug-2004) |
24 |
* Comment : Initial implementation of basic test runner interface |
25 |
* EMail : jds2@users.sourceforge.net |
26 |
* |
27 |
*/ |
28 |
|
29 |
/** @file |
30 |
* Basic interface with output to stdout. |
31 |
*/ |
32 |
/** @addtogroup Basic |
33 |
* @{ |
34 |
*/ |
35 |
|
36 |
#ifndef CUNIT_BASIC_H_SEEN |
37 |
#define CUNIT_BASIC_H_SEEN |
38 |
|
39 |
#include "CUnit.h" |
40 |
#include "TestDB.h" |
41 |
|
42 |
#ifdef __cplusplus |
43 |
extern "C" { |
44 |
#endif |
45 |
|
46 |
/** Run modes for the basic interface. */ |
47 |
typedef enum { |
48 |
CU_BRM_NORMAL = 0, /**< Normal mode - failures and run summary are printed [default]. */ |
49 |
CU_BRM_SILENT, /**< Silent mode - no output is printed except framework error messages. */ |
50 |
CU_BRM_VERBOSE /**< Verbose mode - maximum output of run details. */ |
51 |
} CU_BasicRunMode; |
52 |
|
53 |
CU_EXPORT CU_ErrorCode CU_basic_run_tests(void); |
54 |
CU_EXPORT CU_ErrorCode CU_basic_run_suite(/*@null@*//*@dependent@*/ CU_pSuite pSuite); |
55 |
CU_EXPORT CU_ErrorCode CU_basic_run_test(/*@null@*//*@dependent@*/ CU_pSuite pSuite, |
56 |
/*@null@*//*@dependent@*/ CU_pTest pTest); |
57 |
CU_EXPORT void CU_basic_set_mode(CU_BasicRunMode mode); |
58 |
CU_EXPORT CU_BasicRunMode CU_basic_get_mode(void); |
59 |
CU_EXPORT void CU_basic_show_failures(CU_pFailureRecord pFailure); |
60 |
|
61 |
#ifdef __cplusplus |
62 |
} |
63 |
#endif |
64 |
#endif /* CUNIT_BASIC_H_SEEN */ |
65 |
/** @} */ |