CUnit Programmers Reference  3.0
TestDB.h
Go to the documentation of this file.
1 /*
2  * CUnit - A Unit testing framework library for C.
3  * Copyright (C) 2001 Anil Kumar
4  * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 /*
22  * Contains all the Type Definitions and functions declarations
23  * for the CUnit test database maintenance.
24  *
25  * Aug 2001 Initial implementation. (AK)
26  *
27  * 09/Aug/2001 Added Preprocessor conditionals for the file. (AK)
28  *
29  * 24/aug/2001 Made the linked list from SLL to DLL(doubly linked list). (AK)
30  *
31  * 31-Aug-2004 Restructured to eliminate global variables error_number,
32  * g_pTestRegistry; new interface, support for deprecated
33  * version 1 interface, moved error handling code to
34  * CUError.[ch], moved test run counts and _TestResult out
35  * of TestRegistry to TestRun.h. (JDS)
36  *
37  * 01-Sep-2004 Added jmp_buf to CU_Test. (JDS)
38  *
39  * 05-Sep-2004 Added internal test interface. (JDS)
40  *
41  * 15-Apr-2006 Removed constraint that suites/tests be uniquely named.
42  * Added ability to turn individual tests/suites on or off.
43  * Moved doxygen comments for public API here to header. (JDS)
44  *
45  * 16-Avr-2007 Added setup and teardown functions. (CJN)
46  *
47  */
48 
61 #ifndef CUNIT_TESTDB_H_SEEN
62 #define CUNIT_TESTDB_H_SEEN
63 
64 #include <setjmp.h> /* jmp_buf */
65 
66 #include "CUnit/CUnit.h"
67 #include "CUnit/CUError.h"
68 
69 #ifdef __cplusplus
70 extern "C" {
71 #endif
72 
73 /*=================================================================
74  * Typedefs and Data Structures
75  *=================================================================*/
76 
77 typedef int (*CU_InitializeFunc)(void);
78 typedef int (*CU_CleanupFunc)(void);
79 typedef void (*CU_TestFunc)(void);
80 typedef void (*CU_SetUpFunc)(void);
81 typedef void (*CU_TearDownFunc)(void);
83 /*-----------------------------------------------------------------
84  * CU_Test, CU_pTest
85  *-----------------------------------------------------------------*/
109 typedef struct CU_Test
110 {
111  char* pName;
112  CU_BOOL fActive;
114  jmp_buf* pJumpBuf;
116  struct CU_Test* pNext;
117  struct CU_Test* pPrev;
119  CU_BOOL fSkipped;
120  unsigned uFailedRuns;
122  double dStarted;
123  double dEnded;
125  const char* pSkipReason;
126  const char* pSkipFunction;
127  const char* pSkipFile;
128  unsigned int uiSkipLine;
129 
130  CU_BOOL fSuiteSetup;
131  CU_BOOL fSuiteCleanup;
133 typedef CU_Test* CU_pTest;
135 /*-----------------------------------------------------------------
136  * CU_Suite, CU_pSuite
137  *-----------------------------------------------------------------*/
161 typedef struct CU_Suite
162 {
163  char* pName;
164  CU_BOOL fActive;
174  unsigned int uiNumberOfTests;
175  struct CU_Suite* pNext;
176  struct CU_Suite* pPrev;
178  unsigned int uiNumberOfTestsFailed;
179  unsigned int uiNumberOfTestsSuccess;
181  CU_BOOL fSetUpError;
182  CU_BOOL fCleanupError;
183  CU_BOOL fInSetUp;
184  CU_BOOL fInClean;
185  CU_BOOL fSkipped;
186  CU_BOOL fInTestSetup;
187  CU_BOOL fInTestClean;
189  const char* pSkipReason;
190  const char* pSkipFunction;
191  const char* pSkipFile;
192  unsigned int uiSkipLine;
193 
194  double dStarted;
195  double dEnded;
197 typedef CU_Suite* CU_pSuite;
199 /*-----------------------------------------------------------------
200  * CU_TestRegistry, CU_pTestRegistry
201  *-----------------------------------------------------------------*/
236 typedef struct CU_TestRegistry
237 {
238 #ifdef USE_DEPRECATED_CUNIT_NAMES
240  union {
241  unsigned int uiNumberOfSuites;
242  unsigned int uiNumberOfGroups;
243  };
244  unsigned int uiNumberOfTests;
246  union {
249  };
250 #else
251  unsigned int uiNumberOfSuites;
252  unsigned int uiNumberOfTests;
253  CU_pSuite pSuite;
254 #endif
258 /*=================================================================
259  * Public interface functions
260  *=================================================================*/
261 
262 CU_EXPORT
282 CU_EXPORT
283 void CU_cleanup_registry(void);
302 CU_EXPORT CU_BOOL CU_registry_initialized(void);
312 CU_EXPORT
313 CU_pSuite CU_add_suite(const char *strName,
314  CU_InitializeFunc pInit,
315  CU_CleanupFunc pClean);
352 CU_EXPORT
354  CU_InitializeFunc pInit,
355  CU_CleanupFunc pClean,
356  CU_SetUpFunc pSetup,
357  CU_TearDownFunc pTear);
366 CU_EXPORT
367 CU_ErrorCode CU_set_suite_active(CU_pSuite pSuite, CU_BOOL fNewActive);
383 CU_EXPORT
384 CU_ErrorCode CU_set_suite_name(CU_pSuite pSuite, const char *strNewName);
402 CU_EXPORT
421 CU_EXPORT
439 CU_EXPORT
440 CU_pSuite CU_get_suite(const char* strName);
456 CU_EXPORT
457 CU_pSuite CU_get_suite_at_pos(unsigned int pos);
473 CU_EXPORT
474 unsigned int CU_get_suite_pos(CU_pSuite pSuite);
491 CU_EXPORT
492 unsigned int CU_get_suite_pos_by_name(const char* strName);
510 CU_EXPORT
511 CU_pTest CU_add_test(CU_pSuite pSuite, const char* strName, CU_TestFunc pTestFunc);
547 CU_EXPORT
548 CU_ErrorCode CU_set_test_active(CU_pTest pTest, CU_BOOL fNewActive);
565 CU_EXPORT
566 CU_ErrorCode CU_set_test_name(CU_pTest pTest, const char *strNewName);
584 CU_EXPORT
602 CU_EXPORT
603 CU_pTest CU_get_test(CU_pSuite pSuite, const char *strName);
623 CU_EXPORT
624 CU_pTest CU_get_test_at_pos(CU_pSuite pSuite, unsigned int pos);
642 CU_EXPORT
643 unsigned int CU_get_test_pos(CU_pSuite pSuite, CU_pTest pTest);
663 CU_EXPORT
664 unsigned int CU_get_test_pos_by_name(CU_pSuite pSuite, const char *strName);
684 #define CU_ADD_TEST(suite, test) (CU_add_test(suite, #test, (CU_TestFunc)test))
687 CU_EXPORT
688 CU_ErrorCode CU_set_all_active(CU_BOOL fNewActive);
702 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
703 /* This section is based conceptually on code
704  * Copyright (C) 2004 Aurema Pty Ltd.
705  *
706  * This library is free software; you can redistribute it and/or
707  * modify it under the terms of the GNU Library General Public
708  * License as published by the Free Software Foundation; either
709  * version 2 of the License, or (at your option) any later version.
710  *
711  * This library is distributed in the hope that it will be useful,
712  * but WITHOUT ANY WARRANTY; without even the implied warranty of
713  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
714  * Library General Public License for more details.
715  *
716  * You should have received a copy of the GNU Library General Public
717  * License along with this library; if not, write to the Free Software
718  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
719  *
720  * Derived from code contributed by K. Cheung and Aurema Pty Ltd. (thanks!)
721  * test_case_t, test_group_t, test_suite_t
722  */
723 
730 typedef struct CU_TestInfo {
731  const char *pName;
743 typedef struct CU_SuiteInfo {
744  const char *pName;
753 #define CU_TEST_INFO_NULL { NULL, NULL }
755 #define CU_SUITE_INFO_NULL { NULL, NULL, NULL, NULL, NULL, NULL }
759 CU_EXPORT CU_ErrorCode CU_register_suites(CU_SuiteInfo suite_info[]);
768 CU_EXPORT CU_ErrorCode CU_register_nsuites(int suite_count, ...);
782 #ifdef USE_DEPRECATED_CUNIT_NAMES
783 typedef CU_TestInfo test_case_t;
787 typedef struct test_suite {
788  char *name;
791 
793 #define TEST_CASE_NULL { NULL, NULL }
795 #define TEST_GROUP_NULL { NULL, NULL, NULL, NULL }
796 
798 #define test_group_register(tg) CU_register_suites(tg)
799 
801 CU_EXPORT int test_suite_register(test_suite_t *ts)
802 {
803  test_group_t *tg;
804  int error;
805 
806  for (tg = ts->groups; tg->pName; tg++)
807  if ((error = CU_register_suites(tg)) != CUE_SUCCESS)
808  return error;
809 
810  return CUE_SUCCESS;
811 }
812 #endif /* USE_DEPRECATED_CUNIT_NAMES */
813 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
814 
815 #ifdef USE_DEPRECATED_CUNIT_NAMES
820 typedef CU_Test _TestCase;
823 typedef CU_Suite _TestGroup;
829 /* Public interface functions */
831 #define initialize_registry() CU_initialize_registry()
833 #define cleanup_registry() CU_cleanup_registry()
835 #define add_test_group(name, init, clean) CU_add_suite(name, init, clean)
837 #define add_test_case(group, name, test) CU_add_test(group, name, test)
838 
839 /* private internal CUnit testing functions */
841 #define get_registry() CU_get_registry()
843 #define set_registry(reg) CU_set_registry((reg))
844 
846 #define get_group_by_name(group, reg) CU_get_suite_by_name(group, reg)
848 #define get_test_by_name(test, group) CU_get_test_by_name(test, group)
849 
851 #define ADD_TEST_TO_GROUP(group, test) (CU_add_test(group, #test, (CU_TestFunc)test))
852 #endif /* USE_DEPRECATED_CUNIT_NAMES */
853 
854 /*=================================================================
855  * Internal CUnit system functions.
856  * Should not be routinely called by users.
857  *=================================================================*/
858 
859 CU_EXPORT CU_pTestRegistry CU_get_registry(void);
872 CU_EXPORT CU_pTestRegistry CU_set_registry(CU_pTestRegistry pTestRegistry);
899 CU_EXPORT
915 CU_EXPORT
916 CU_pSuite CU_get_suite_by_name(const char *szSuiteName, CU_pTestRegistry pRegistry);
931 CU_EXPORT
932 CU_pSuite CU_get_suite_by_index(unsigned int index, CU_pTestRegistry pRegistry);
947 CU_EXPORT
948 CU_pTest CU_get_test_by_name(const char* szTestName, CU_pSuite pSuite);
962 CU_EXPORT
963 CU_pTest CU_get_test_by_index(unsigned int index, CU_pSuite pSuite);
978 #ifdef CUNIT_BUILD_TESTS
979 void test_cunit_TestDB(void);
980 #endif
981 
982 #ifdef __cplusplus
983 }
984 #endif
985 #endif /* CUNIT_TESTDB_H_SEEN */
Error handling functions (user interface).
CU_EXPORT CU_pSuite CU_get_suite(const char *strName)
Retrieves the suite having the specified name.
Definition: TestDB.c:284
CU_EXPORT unsigned int CU_get_suite_pos(CU_pSuite pSuite)
Looks up the position of the specified suite.
Definition: TestDB.c:321
struct CU_Suite CU_Suite
CUnit suite data type.
CU_EXPORT unsigned int CU_get_test_pos_by_name(CU_pSuite pSuite, const char *strName)
Looks up the position of the test having the specified name in pSuite.
Definition: TestDB.c:545
CU_TestInfo * CU_pTestInfo
Pointer to CU_TestInfo type.
Definition: TestDB.h:735
CU_EXPORT CU_pSuite CU_add_suite(const char *strName, CU_InitializeFunc pInit, CU_CleanupFunc pClean)
Creates a new test suite and adds it to the test registry.
Definition: TestDB.c:209
CU_EXPORT void CU_destroy_existing_registry(CU_pTestRegistry *ppRegistry)
Destroys and frees all memory for an existing test registry.
Definition: TestDB.c:1021
CU_EXPORT CU_ErrorCode CU_register_suites(CU_SuiteInfo suite_info[])
Registers the suites in a single CU_SuiteInfo array.
Definition: TestDB.c:654
CU_pSuite PTestGroup
Deprecated (version 1).
Definition: TestDB.h:825
CU_Test * CU_pTest
Pointer to a CUnit test case.
Definition: TestDB.h:133
CU_EXPORT CU_ErrorCode CU_set_suite_initfunc(CU_pSuite pSuite, CU_InitializeFunc pNewInit)
Modifies the initialization function of a suite.
Definition: TestDB.c:252
CU_TestInfo test_case_t
Deprecated (version 1).
Definition: TestDB.h:784
CU_EXPORT CU_pSuite CU_get_suite_by_name(const char *szSuiteName, CU_pTestRegistry pRegistry)
Retrieves a pointer to the suite having the specified name.
Definition: TestDB.c:1035
CU_EXPORT unsigned int CU_get_test_pos(CU_pSuite pSuite, CU_pTest pTest)
Looks up the position of the specified test in pSuite.
Definition: TestDB.c:513
CU_TestRegistry * CU_pTestRegistry
Pointer to a CUnit test registry.
Definition: TestDB.h:256
CU_TestRegistry _TestRegistry
Deprecated (version 1).
Definition: TestDB.h:827
CU_CleanupFunc CleanupFunc
Deprecated (version 1).
Definition: TestDB.h:818
void(* CU_TearDownFunc)(void)
Signature for a test TearDown function.
Definition: TestDB.h:81
CU_EXPORT CU_ErrorCode CU_set_test_func(CU_pTest pTest, CU_TestFunc pNewFunc)
Modifies the test function of a test.
Definition: TestDB.c:454
CU_EXPORT CU_pTestRegistry CU_set_registry(CU_pTestRegistry pTestRegistry)
Sets the registry to an existing CU_pTestRegistry instance.
Definition: TestDB.c:143
CU_EXPORT CU_ErrorCode CU_register_nsuites(int suite_count,...)
Registers multiple suite arrays in CU_SuiteInfo format.
Definition: TestDB.c:619
void(* CU_SetUpFunc)(void)
Signature for a test SetUp function.
Definition: TestDB.h:80
CU_EXPORT CU_pTest CU_get_test_at_pos(CU_pSuite pSuite, unsigned int pos)
Retrieves the test at the specified position in pSuite.
Definition: TestDB.c:493
CU_EXPORT CU_pTestRegistry CU_create_new_registry(void)
Creates and initializes a new test registry.
Definition: TestDB.c:1008
struct CU_Test CU_Test
CUnit test case data type.
CU_EXPORT CU_BOOL CU_registry_initialized(void)
Checks whether the test registry has been initialized.
Definition: TestDB.c:120
CU_EXPORT CU_pSuite CU_add_suite_with_setup_and_teardown(const char *strName, CU_InitializeFunc pInit, CU_CleanupFunc pClean, CU_SetUpFunc pSetup, CU_TearDownFunc pTear)
The same as CU_add_suite but also adds setup and tear down callbacks for each test in this suite.
Definition: TestDB.c:167
CU_EXPORT CU_pTest CU_get_test_by_name(const char *szTestName, CU_pSuite pSuite)
Retrieves a pointer to the test case in pSuite having the specified name.
Definition: TestDB.c:1074
CU_EXPORT void CU_cleanup_registry(void)
Clears the test registry.
Definition: TestDB.c:126
CU_EXPORT int test_suite_register(test_suite_t *ts)
Deprecated (version 1).
Definition: TestDB.h:802
CU_InitializeFunc InitializeFunc
Deprecated (version 1).
Definition: TestDB.h:817
struct CU_TestRegistry CU_TestRegistry
CUnit test registry data type.
int(* CU_CleanupFunc)(void)
Signature for suite cleanup function.
Definition: TestDB.h:78
CU_SuiteInfo test_group_t
Deprecated (version 1).
Definition: TestDB.h:785
CU_ErrorCode
CUnit error codes.
Definition: CUError.h:62
struct CU_TestInfo CU_TestInfo
Test case parameters structure.
CU_EXPORT CU_ErrorCode CU_set_test_name(CU_pTest pTest, const char *strNewName)
Modifies the name of a test.
Definition: TestDB.c:433
CU_EXPORT unsigned int CU_get_suite_pos_by_name(const char *strName)
Looks up the position of the suite having the specified name.
Definition: TestDB.c:350
CU_EXPORT CU_ErrorCode CU_set_suite_name(CU_pSuite pSuite, const char *strNewName)
Modifies the name of a suite.
Definition: TestDB.c:231
void(* CU_TestFunc)(void)
Signature for a testing function in a test case.
Definition: TestDB.h:79
struct CU_SuiteInfo CU_SuiteInfo
Suite parameters.
CU_pTestRegistry PTestRegistry
Deprecated (version 1).
Definition: TestDB.h:828
CU_Test _TestCase
Deprecated (version 1).
Definition: TestDB.h:821
CU_EXPORT CU_pTest CU_get_test_by_index(unsigned int index, CU_pSuite pSuite)
Retrieves a pointer to the test at the specified (1-based) index.
Definition: TestDB.c:1095
int(* CU_InitializeFunc)(void)
Signature for suite initialization function.
Definition: TestDB.h:77
CU_Suite * CU_pSuite
Pointer to a CUnit suite.
Definition: TestDB.h:197
CU_EXPORT CU_ErrorCode CU_set_suite_cleanupfunc(CU_pSuite pSuite, CU_CleanupFunc pNewClean)
Modifies the cleanup function of a suite.
Definition: TestDB.c:268
CU_EXPORT CU_pSuite CU_get_suite_at_pos(unsigned int pos)
Retrieves the suite at the specified position.
Definition: TestDB.c:304
CU_TestFunc TestFunc
Deprecated (version 1).
Definition: TestDB.h:819
CU_EXPORT CU_ErrorCode CU_set_suite_active(CU_pSuite pSuite, CU_BOOL fNewActive)
Activates or deactivates a suite.
Definition: TestDB.c:215
CU_EXPORT CU_pTestRegistry CU_get_registry(void)
Retrieves a pointer to the current test registry.
Definition: TestDB.c:137
CU_EXPORT CU_ErrorCode CU_set_test_active(CU_pTest pTest, CU_BOOL fNewActive)
Activates or deactivates a specific test.
Definition: TestDB.c:417
struct test_suite test_suite_t
Deprecated (version 1).
CU_EXPORT CU_pSuite CU_get_suite_by_index(unsigned int index, CU_pTestRegistry pRegistry)
Retrieves a pointer to the suite at the specified (1-based) index.
Definition: TestDB.c:1056
CU_EXPORT CU_ErrorCode CU_initialize_registry(void)
Initializes the framework test registry.
Definition: TestDB.c:99
CU_SuiteInfo * CU_pSuiteInfo
Pointer to CU_SuiteInfo type.
Definition: TestDB.h:752
CU_EXPORT CU_ErrorCode CU_set_all_active(CU_BOOL fNewActive)
Activates or deactivates all tests.
Definition: TestDB.c:577
CU_EXPORT CU_pTest CU_get_test(CU_pSuite pSuite, const char *strName)
Retrieves the test having the specified name.
Definition: TestDB.c:470
CU_Suite _TestGroup
Deprecated (version 1).
Definition: TestDB.h:824
CU_pTest PTestCase
Deprecated (version 1).
Definition: TestDB.h:822
CU_EXPORT CU_pTest CU_add_test(CU_pSuite pSuite, const char *strName, CU_TestFunc pTestFunc)
This function creates a new test having the specified name and function, and adds it to the specified...
Definition: TestDB.c:379
@ CUE_SUCCESS
No error condition.
Definition: CUError.h:64
Suite parameters.
Definition: TestDB.h:744
CU_SetUpFunc pSetUpFunc
Pointer to the test SetUp function.
Definition: TestDB.h:748
CU_TestInfo * pTests
Test case array - must be NULL terminated.
Definition: TestDB.h:750
CU_InitializeFunc pInitFunc
Suite initialization function.
Definition: TestDB.h:746
CU_TearDownFunc pTearDownFunc
Pointer to the test TearDown function.
Definition: TestDB.h:749
CU_CleanupFunc pCleanupFunc
Suite cleanup function.
Definition: TestDB.h:747
const char * pName
Suite name.
Definition: TestDB.h:745
CUnit suite data type.
Definition: TestDB.h:162
unsigned int uiNumberOfTestsSuccess
Number of success tests in the suite.
Definition: TestDB.h:179
CU_SetUpFunc pSetUpFunc
Pointer to the test SetUp function.
Definition: TestDB.h:168
CU_TearDownFunc pTearDownFunc
Pointer to the test TearDown function.
Definition: TestDB.h:169
CU_BOOL fSkipped
Flag for whether the suite was skipped during a run.
Definition: TestDB.h:185
CU_BOOL fInTestClean
Flag set if we are running a test teardown function.
Definition: TestDB.h:187
CU_InitializeFunc pInitializeFunc
Pointer to the suite initialization function.
Definition: TestDB.h:166
CU_pTest pInitializeFuncTest
Pointer to the "test" entry representing suite setup.
Definition: TestDB.h:171
struct CU_Suite * pNext
Pointer to the next suite in linked list.
Definition: TestDB.h:175
CU_BOOL fCleanupError
Flag set if the suite cleanup function failed a CU_ASSERT.
Definition: TestDB.h:182
CU_pTest pCleanupFuncTest
Pointer to the "test" entry representing suite cleanup.
Definition: TestDB.h:172
CU_BOOL fInSetUp
Flag set if we are running the suite setup function.
Definition: TestDB.h:183
struct CU_Suite * pPrev
Pointer to the previous suite in linked list.
Definition: TestDB.h:176
CU_BOOL fInClean
Flag set if we are running the suite cleanup function.
Definition: TestDB.h:184
double dEnded
clock time suite started
Definition: TestDB.h:195
unsigned int uiNumberOfTests
Number of tests in the suite.
Definition: TestDB.h:174
char * pName
Suite name.
Definition: TestDB.h:163
CU_pTest pTest
Pointer to the 1st test in the suite.
Definition: TestDB.h:165
unsigned int uiNumberOfTestsFailed
Number of failed tests in the suite.
Definition: TestDB.h:178
CU_CleanupFunc pCleanupFunc
Pointer to the suite cleanup function.
Definition: TestDB.h:167
CU_BOOL fSetUpError
Flag set if the suite setup function failed a CU_ASSERT.
Definition: TestDB.h:181
CU_BOOL fActive
Flag for whether suite is executed during a run.
Definition: TestDB.h:164
CU_BOOL fInTestSetup
Flag set if we are running a test setup function.
Definition: TestDB.h:186
Test case parameters structure.
Definition: TestDB.h:731
const char * pName
Test name.
Definition: TestDB.h:732
CU_TestFunc pTestFunc
Test function.
Definition: TestDB.h:733
CUnit test registry data type.
Definition: TestDB.h:237
unsigned int uiNumberOfTests
Number of tests in the test registry.
Definition: TestDB.h:244
unsigned int uiNumberOfGroups
Deprecated (version 1).
Definition: TestDB.h:242
CU_pSuite pSuite
Pointer to the 1st suite in the test registry.
Definition: TestDB.h:247
unsigned int uiNumberOfSuites
Number of suites in the test registry.
Definition: TestDB.h:241
CU_pSuite pGroup
Deprecated (version 1).
Definition: TestDB.h:248
CUnit test case data type.
Definition: TestDB.h:110
struct CU_Test * pPrev
Pointer to the previous test in linked list.
Definition: TestDB.h:117
CU_BOOL fSkipped
Flag for whether the test was skipped during a run.
Definition: TestDB.h:119
CU_BOOL fSuiteSetup
Flag set if this is a suite setup entry (not an actual test)
Definition: TestDB.h:130
const char * pSkipReason
clock time test ended
Definition: TestDB.h:125
CU_TestFunc pTestFunc
Pointer to the test function.
Definition: TestDB.h:113
CU_BOOL fSuiteCleanup
Flag set if this is a suite cleanup entry (not an actual test)
Definition: TestDB.h:131
unsigned uFailedRuns
Number of times this test has failed.
Definition: TestDB.h:120
struct CU_Test * pNext
Pointer to the next test in linked list.
Definition: TestDB.h:116
CU_BOOL fActive
Flag for whether test is executed during a run.
Definition: TestDB.h:112
jmp_buf * pJumpBuf
Jump buffer for setjmp/longjmp test abort mechanism.
Definition: TestDB.h:114
double dEnded
clock time test started
Definition: TestDB.h:123
char * pName
Test name.
Definition: TestDB.h:111
Deprecated (version 1).
Definition: TestDB.h:788
test_group_t * groups
Test groups.
Definition: TestDB.h:790
char * name
Suite name.
Definition: TestDB.h:789