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_sort_suites(CU_pTestRegistry pRegistry);
284 
285 CU_EXPORT
286 void CU_cleanup_registry(void);
305 CU_EXPORT CU_BOOL CU_registry_initialized(void);
315 CU_EXPORT
316 CU_pSuite CU_add_suite(const char *strName,
317  CU_InitializeFunc pInit,
318  CU_CleanupFunc pClean);
355 CU_EXPORT
357  CU_InitializeFunc pInit,
358  CU_CleanupFunc pClean,
359  CU_SetUpFunc pSetup,
360  CU_TearDownFunc pTear);
369 CU_EXPORT
370 CU_ErrorCode CU_set_suite_active(CU_pSuite pSuite, CU_BOOL fNewActive);
386 CU_EXPORT
387 CU_ErrorCode CU_set_suite_name(CU_pSuite pSuite, const char *strNewName);
405 CU_EXPORT
424 CU_EXPORT
442 CU_EXPORT
443 CU_pSuite CU_get_suite(const char* strName);
459 CU_EXPORT
460 CU_pSuite CU_get_suite_at_pos(unsigned int pos);
476 CU_EXPORT
477 unsigned int CU_get_suite_pos(CU_pSuite pSuite);
494 CU_EXPORT
495 unsigned int CU_get_suite_pos_by_name(const char* strName);
513 CU_EXPORT
514 CU_pTest CU_add_test(CU_pSuite pSuite, const char* strName, CU_TestFunc pTestFunc);
550 CU_EXPORT
551 CU_ErrorCode CU_set_test_active(CU_pTest pTest, CU_BOOL fNewActive);
568 CU_EXPORT
569 CU_ErrorCode CU_set_test_name(CU_pTest pTest, const char *strNewName);
587 CU_EXPORT
605 CU_EXPORT
606 CU_pTest CU_get_test(CU_pSuite pSuite, const char *strName);
626 CU_EXPORT
627 CU_pTest CU_get_test_at_pos(CU_pSuite pSuite, unsigned int pos);
645 CU_EXPORT
646 unsigned int CU_get_test_pos(CU_pSuite pSuite, CU_pTest pTest);
666 CU_EXPORT
667 unsigned int CU_get_test_pos_by_name(CU_pSuite pSuite, const char *strName);
687 #define CU_ADD_TEST(suite, test) (CU_add_test(suite, #test, (CU_TestFunc)test))
690 CU_EXPORT
691 CU_ErrorCode CU_set_all_active(CU_BOOL fNewActive);
705 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
706 /* This section is based conceptually on code
707  * Copyright (C) 2004 Aurema Pty Ltd.
708  *
709  * This library is free software; you can redistribute it and/or
710  * modify it under the terms of the GNU Library General Public
711  * License as published by the Free Software Foundation; either
712  * version 2 of the License, or (at your option) any later version.
713  *
714  * This library is distributed in the hope that it will be useful,
715  * but WITHOUT ANY WARRANTY; without even the implied warranty of
716  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
717  * Library General Public License for more details.
718  *
719  * You should have received a copy of the GNU Library General Public
720  * License along with this library; if not, write to the Free Software
721  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
722  *
723  * Derived from code contributed by K. Cheung and Aurema Pty Ltd. (thanks!)
724  * test_case_t, test_group_t, test_suite_t
725  */
726 
733 typedef struct CU_TestInfo {
734  const char *pName;
746 typedef struct CU_SuiteInfo {
747  const char *pName;
756 #define CU_TEST_INFO_NULL { NULL, NULL }
758 #define CU_SUITE_INFO_NULL { NULL, NULL, NULL, NULL, NULL, NULL }
762 CU_EXPORT CU_ErrorCode CU_register_suites(CU_SuiteInfo suite_info[]);
771 CU_EXPORT CU_ErrorCode CU_register_nsuites(int suite_count, ...);
785 #ifdef USE_DEPRECATED_CUNIT_NAMES
786 typedef CU_TestInfo test_case_t;
790 typedef struct test_suite {
791  char *name;
794 
796 #define TEST_CASE_NULL { NULL, NULL }
798 #define TEST_GROUP_NULL { NULL, NULL, NULL, NULL }
799 
801 #define test_group_register(tg) CU_register_suites(tg)
802 
804 CU_EXPORT int test_suite_register(test_suite_t *ts)
805 {
806  test_group_t *tg;
807  int error;
808 
809  for (tg = ts->groups; tg->pName; tg++)
810  if ((error = CU_register_suites(tg)) != CUE_SUCCESS)
811  return error;
812 
813  return CUE_SUCCESS;
814 }
815 #endif /* USE_DEPRECATED_CUNIT_NAMES */
816 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
817 
818 #ifdef USE_DEPRECATED_CUNIT_NAMES
823 typedef CU_Test _TestCase;
826 typedef CU_Suite _TestGroup;
832 /* Public interface functions */
834 #define initialize_registry() CU_initialize_registry()
836 #define cleanup_registry() CU_cleanup_registry()
838 #define add_test_group(name, init, clean) CU_add_suite(name, init, clean)
840 #define add_test_case(group, name, test) CU_add_test(group, name, test)
841 
842 /* private internal CUnit testing functions */
844 #define get_registry() CU_get_registry()
846 #define set_registry(reg) CU_set_registry((reg))
847 
849 #define get_group_by_name(group, reg) CU_get_suite_by_name(group, reg)
851 #define get_test_by_name(test, group) CU_get_test_by_name(test, group)
852 
854 #define ADD_TEST_TO_GROUP(group, test) (CU_add_test(group, #test, (CU_TestFunc)test))
855 #endif /* USE_DEPRECATED_CUNIT_NAMES */
856 
857 /*=================================================================
858  * Internal CUnit system functions.
859  * Should not be routinely called by users.
860  *=================================================================*/
861 
862 CU_EXPORT CU_pTestRegistry CU_get_registry(void);
875 CU_EXPORT CU_pTestRegistry CU_set_registry(CU_pTestRegistry pTestRegistry);
902 CU_EXPORT
918 CU_EXPORT
919 CU_pSuite CU_get_suite_by_name(const char *szSuiteName, CU_pTestRegistry pRegistry);
934 CU_EXPORT
935 CU_pSuite CU_get_suite_by_index(unsigned int index, CU_pTestRegistry pRegistry);
950 CU_EXPORT
951 CU_pTest CU_get_test_by_name(const char* szTestName, CU_pSuite pSuite);
965 CU_EXPORT
966 CU_pTest CU_get_test_by_index(unsigned int index, CU_pSuite pSuite);
981 #ifdef CUNIT_BUILD_TESTS
982 void test_cunit_TestDB(void);
983 #endif
984 
985 #ifdef __cplusplus
986 }
987 #endif
988 #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:738
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:1059
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:828
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:787
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:1073
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:830
CU_CleanupFunc CleanupFunc
Deprecated (version 1).
Definition: TestDB.h:821
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:1046
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:1112
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:805
CU_InitializeFunc InitializeFunc
Deprecated (version 1).
Definition: TestDB.h:820
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:788
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:831
CU_EXPORT void CU_sort_suites(CU_pTestRegistry pRegistry)
Sort the registered test suites into alphabetical order.
Definition: TestDB.c:841
CU_Test _TestCase
Deprecated (version 1).
Definition: TestDB.h:824
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:1133
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:822
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:1094
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:755
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:827
CU_pTest PTestCase
Deprecated (version 1).
Definition: TestDB.h:825
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:747
CU_SetUpFunc pSetUpFunc
Pointer to the test SetUp function.
Definition: TestDB.h:751
CU_TestInfo * pTests
Test case array - must be NULL terminated.
Definition: TestDB.h:753
CU_InitializeFunc pInitFunc
Suite initialization function.
Definition: TestDB.h:749
CU_TearDownFunc pTearDownFunc
Pointer to the test TearDown function.
Definition: TestDB.h:752
CU_CleanupFunc pCleanupFunc
Suite cleanup function.
Definition: TestDB.h:750
const char * pName
Suite name.
Definition: TestDB.h:748
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:734
const char * pName
Test name.
Definition: TestDB.h:735
CU_TestFunc pTestFunc
Test function.
Definition: TestDB.h:736
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:791
test_group_t * groups
Test groups.
Definition: TestDB.h:793
char * name
Suite name.
Definition: TestDB.h:792