/[ascend]/trunk/test/CUnit/Basic.h
ViewVC logotype

Contents of /trunk/test/CUnit/Basic.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 59 - (show annotations) (download) (as text)
Sun Oct 30 01:38:20 2005 UTC (15 years ago) by jds
File MIME type: text/x-chdr
File size: 2355 byte(s)
- prototype unit test suite based on CUnit added.
- unit tests for base/generic/general and base/generic/utilites added.
- 2nd manual rework of doxygen documentation in general and utilities.
- bug fixes (mostly general & utilities) found during test development.
- added asc_assert prototype to redirect failures to Asc_Panic() and enable decoupling assertions from NDEBUG.
- some modifications of interface & implementation to facilitate testing.
- utilities/ascPrint & utilities/ascMalloc functions now always included in base libs to minimize recompilation when an interface chooses different options.
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 /** @} */

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22