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 #include "CUnit/Simple.h"
69 #include "CUnit/TestFixture.h"
70 
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74 
75 /*=================================================================
76  * Typedefs and Data Structures
77  *=================================================================*/
78 
79 /*-----------------------------------------------------------------
80  * CU_Test, CU_pTest
81  *-----------------------------------------------------------------*/
105 typedef struct CU_Test
106 {
107  char* pName;
108  CU_BOOL fActive;
110  jmp_buf* pJumpBuf;
112  struct CU_Test* pNext;
113  struct CU_Test* pPrev;
115  CU_BOOL fSkipped;
116  unsigned uFailedRuns;
118  double dStarted;
119  double dEnded;
121  const char* pSkipReason;
122  const char* pSkipFunction;
123  const char* pSkipFile;
124  unsigned int uiSkipLine;
125 
126  CU_BOOL fSuiteSetup;
127  CU_BOOL fSuiteCleanup;
129 typedef CU_Test* CU_pTest;
131 /*-----------------------------------------------------------------
132  * CU_Suite, CU_pSuite
133  *-----------------------------------------------------------------*/
157 typedef struct CU_Suite
158 {
159  char* pName;
160  CU_BOOL fActive;
170  unsigned int uiNumberOfTests;
171  struct CU_Suite* pNext;
172  struct CU_Suite* pPrev;
174  unsigned int uiNumberOfTestsFailed;
175  unsigned int uiNumberOfTestsSuccess;
177  CU_BOOL fSetUpError;
178  CU_BOOL fCleanupError;
179  CU_BOOL fInSetUp;
180  CU_BOOL fInClean;
181  CU_BOOL fSkipped;
182  CU_BOOL fInTestSetup;
183  CU_BOOL fInTestClean;
185  const char* pSkipReason;
186  const char* pSkipFunction;
187  const char* pSkipFile;
188  unsigned int uiSkipLine;
189 
190  double dStarted;
191  double dEnded;
193 typedef CU_Suite* CU_pSuite;
195 /*-----------------------------------------------------------------
196  * CU_TestRegistry, CU_pTestRegistry
197  *-----------------------------------------------------------------*/
232 typedef struct CU_TestRegistry
233 {
234 #ifdef USE_DEPRECATED_CUNIT_NAMES
236  union {
237  unsigned int uiNumberOfSuites;
238  unsigned int uiNumberOfGroups;
239  };
240  unsigned int uiNumberOfTests;
242  union {
245  };
246 #else
247  unsigned int uiNumberOfSuites;
248  unsigned int uiNumberOfTests;
249  CU_pSuite pSuite;
250 #endif
254 /*=================================================================
255  * Public interface functions
256  *=================================================================*/
257 
258 CU_EXPORT
278 CU_EXPORT
279 void CU_sort_suites(CU_pTestRegistry pRegistry);
280 
281 CU_EXPORT
282 void CU_cleanup_registry(void);
301 CU_EXPORT CU_BOOL CU_registry_initialized(void);
311 CU_EXPORT
312 CU_pSuite CU_add_suite(const char *strName,
313  CU_InitializeFunc pInit,
314  CU_CleanupFunc pClean);
351 CU_EXPORT
353  CU_InitializeFunc pInit,
354  CU_CleanupFunc pClean,
355  CU_SetUpFunc pSetup,
356  CU_TearDownFunc pTear);
365 CU_EXPORT
366 CU_ErrorCode CU_set_suite_active(CU_pSuite pSuite, CU_BOOL fNewActive);
382 CU_EXPORT
383 CU_ErrorCode CU_set_suite_name(CU_pSuite pSuite, const char *strNewName);
401 CU_EXPORT
420 CU_EXPORT
438 CU_EXPORT
439 CU_pSuite CU_get_suite(const char* strName);
455 CU_EXPORT
456 CU_pSuite CU_get_suite_at_pos(unsigned int pos);
472 CU_EXPORT
473 unsigned int CU_get_suite_pos(CU_pSuite pSuite);
490 CU_EXPORT
491 unsigned int CU_get_suite_pos_by_name(const char* strName);
509 CU_EXPORT
510 CU_pTest CU_add_test(CU_pSuite pSuite, const char* strName, CU_TestFunc pTestFunc);
546 CU_EXPORT
547 CU_ErrorCode CU_set_test_active(CU_pTest pTest, CU_BOOL fNewActive);
564 CU_EXPORT
565 CU_ErrorCode CU_set_test_name(CU_pTest pTest, const char *strNewName);
583 CU_EXPORT
601 CU_EXPORT
602 CU_pTest CU_get_test(CU_pSuite pSuite, const char *strName);
622 CU_EXPORT
623 CU_pTest CU_get_test_at_pos(CU_pSuite pSuite, unsigned int pos);
641 CU_EXPORT
642 unsigned int CU_get_test_pos(CU_pSuite pSuite, CU_pTest pTest);
662 CU_EXPORT
663 unsigned int CU_get_test_pos_by_name(CU_pSuite pSuite, const char *strName);
683 #define CU_ADD_TEST(suite, test) (CU_add_test(suite, #test, (CU_TestFunc)test))
686 CU_EXPORT
687 CU_ErrorCode CU_set_all_active(CU_BOOL fNewActive);
701 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
702 /* This section is based conceptually on code
703  * Copyright (C) 2004 Aurema Pty Ltd.
704  *
705  * This library is free software; you can redistribute it and/or
706  * modify it under the terms of the GNU Library General Public
707  * License as published by the Free Software Foundation; either
708  * version 2 of the License, or (at your option) any later version.
709  *
710  * This library is distributed in the hope that it will be useful,
711  * but WITHOUT ANY WARRANTY; without even the implied warranty of
712  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
713  * Library General Public License for more details.
714  *
715  * You should have received a copy of the GNU Library General Public
716  * License along with this library; if not, write to the Free Software
717  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
718  *
719  * Derived from code contributed by K. Cheung and Aurema Pty Ltd. (thanks!)
720  * test_case_t, test_group_t, test_suite_t
721  */
722 
729 typedef struct CU_TestInfo {
730  const char *pName;
742 typedef struct CU_SuiteInfo {
743  const char *pName;
752 #define CU_TEST_INFO_NULL { NULL, NULL }
754 #define CU_SUITE_INFO_NULL { NULL, NULL, NULL, NULL, NULL, NULL }
758 CU_EXPORT CU_ErrorCode CU_register_suites(CU_SuiteInfo suite_info[]);
767 CU_EXPORT CU_ErrorCode CU_register_nsuites(int suite_count, ...);
781 #ifdef USE_DEPRECATED_CUNIT_NAMES
782 typedef CU_TestInfo test_case_t;
786 typedef struct test_suite {
787  char *name;
790 
792 #define TEST_CASE_NULL { NULL, NULL }
794 #define TEST_GROUP_NULL { NULL, NULL, NULL, NULL }
795 
797 #define test_group_register(tg) CU_register_suites(tg)
798 
800 CU_EXPORT int test_suite_register(test_suite_t *ts)
801 {
802  test_group_t *tg;
803  int error;
804 
805  for (tg = ts->groups; tg->pName; tg++)
806  if ((error = CU_register_suites(tg)) != CUE_SUCCESS)
807  return error;
808 
809  return CUE_SUCCESS;
810 }
811 #endif /* USE_DEPRECATED_CUNIT_NAMES */
812 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
813 
814 #ifdef USE_DEPRECATED_CUNIT_NAMES
819 typedef CU_Test _TestCase;
822 typedef CU_Suite _TestGroup;
828 /* Public interface functions */
830 #define initialize_registry() CU_initialize_registry()
832 #define cleanup_registry() CU_cleanup_registry()
834 #define add_test_group(name, init, clean) CU_add_suite(name, init, clean)
836 #define add_test_case(group, name, test) CU_add_test(group, name, test)
837 
838 /* private internal CUnit testing functions */
840 #define get_registry() CU_get_registry()
842 #define set_registry(reg) CU_set_registry((reg))
843 
845 #define get_group_by_name(group, reg) CU_get_suite_by_name(group, reg)
847 #define get_test_by_name(test, group) CU_get_test_by_name(test, group)
848 
850 #define ADD_TEST_TO_GROUP(group, test) (CU_add_test(group, #test, (CU_TestFunc)test))
851 #endif /* USE_DEPRECATED_CUNIT_NAMES */
852 
853 /*=================================================================
854  * Internal CUnit system functions.
855  * Should not be routinely called by users.
856  *=================================================================*/
857 
858 CU_EXPORT CU_pTestRegistry CU_get_registry(void);
871 CU_EXPORT CU_pTestRegistry CU_set_registry(CU_pTestRegistry pTestRegistry);
898 CU_EXPORT
914 CU_EXPORT
915 CU_pSuite CU_get_suite_by_name(const char *szSuiteName, CU_pTestRegistry pRegistry);
930 CU_EXPORT
931 CU_pSuite CU_get_suite_by_index(unsigned int index, CU_pTestRegistry pRegistry);
946 CU_EXPORT
947 CU_pTest CU_get_test_by_name(const char* szTestName, CU_pSuite pSuite);
961 CU_EXPORT
962 CU_pTest CU_get_test_by_index(unsigned int index, CU_pSuite pSuite);
977 #ifdef CUNIT_BUILD_TESTS
978 void test_cunit_TestDB(void);
979 #endif
980 
981 #ifdef __cplusplus
982 }
983 #endif
984 #endif /* CUNIT_TESTDB_H_SEEN */
Error handling functions (user interface).
Funciton pointer prototypes.
Test Fixture support 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:734
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:824
CU_Test * CU_pTest
Pointer to a CUnit test case.
Definition: TestDB.h:129
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:783
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:252
CU_TestRegistry _TestRegistry
Deprecated (version 1).
Definition: TestDB.h:826
CU_CleanupFunc CleanupFunc
Deprecated (version 1).
Definition: TestDB.h:817
void(* CU_TearDownFunc)(void)
Signature for a test TearDown function.
Definition: Simple.h:17
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: Simple.h:16
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:801
CU_InitializeFunc InitializeFunc
Deprecated (version 1).
Definition: TestDB.h:816
struct CU_TestRegistry CU_TestRegistry
CUnit test registry data type.
int(* CU_CleanupFunc)(void)
Signature for suite cleanup function.
Definition: Simple.h:14
CU_SuiteInfo test_group_t
Deprecated (version 1).
Definition: TestDB.h:784
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: Simple.h:15
struct CU_SuiteInfo CU_SuiteInfo
Suite parameters.
CU_pTestRegistry PTestRegistry
Deprecated (version 1).
Definition: TestDB.h:827
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:820
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: Simple.h:13
CU_Suite * CU_pSuite
Pointer to a CUnit suite.
Definition: TestDB.h:193
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:818
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:751
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:823
CU_pTest PTestCase
Deprecated (version 1).
Definition: TestDB.h:821
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:743
CU_SetUpFunc pSetUpFunc
Pointer to the test SetUp function.
Definition: TestDB.h:747
CU_TestInfo * pTests
Test case array - must be NULL terminated.
Definition: TestDB.h:749
CU_InitializeFunc pInitFunc
Suite initialization function.
Definition: TestDB.h:745
CU_TearDownFunc pTearDownFunc
Pointer to the test TearDown function.
Definition: TestDB.h:748
CU_CleanupFunc pCleanupFunc
Suite cleanup function.
Definition: TestDB.h:746
const char * pName
Suite name.
Definition: TestDB.h:744
CUnit suite data type.
Definition: TestDB.h:158
unsigned int uiNumberOfTestsSuccess
Number of success tests in the suite.
Definition: TestDB.h:175
CU_SetUpFunc pSetUpFunc
Pointer to the test SetUp function.
Definition: TestDB.h:164
CU_TearDownFunc pTearDownFunc
Pointer to the test TearDown function.
Definition: TestDB.h:165
CU_BOOL fSkipped
Flag for whether the suite was skipped during a run.
Definition: TestDB.h:181
CU_BOOL fInTestClean
Flag set if we are running a test teardown function.
Definition: TestDB.h:183
CU_InitializeFunc pInitializeFunc
Pointer to the suite initialization function.
Definition: TestDB.h:162
CU_pTest pInitializeFuncTest
Pointer to the "test" entry representing suite setup.
Definition: TestDB.h:167
struct CU_Suite * pNext
Pointer to the next suite in linked list.
Definition: TestDB.h:171
CU_BOOL fCleanupError
Flag set if the suite cleanup function failed a CU_ASSERT.
Definition: TestDB.h:178
CU_pTest pCleanupFuncTest
Pointer to the "test" entry representing suite cleanup.
Definition: TestDB.h:168
CU_BOOL fInSetUp
Flag set if we are running the suite setup function.
Definition: TestDB.h:179
struct CU_Suite * pPrev
Pointer to the previous suite in linked list.
Definition: TestDB.h:172
CU_BOOL fInClean
Flag set if we are running the suite cleanup function.
Definition: TestDB.h:180
double dEnded
clock time suite started
Definition: TestDB.h:191
unsigned int uiNumberOfTests
Number of tests in the suite.
Definition: TestDB.h:170
char * pName
Suite name.
Definition: TestDB.h:159
CU_pTest pTest
Pointer to the 1st test in the suite.
Definition: TestDB.h:161
unsigned int uiNumberOfTestsFailed
Number of failed tests in the suite.
Definition: TestDB.h:174
CU_CleanupFunc pCleanupFunc
Pointer to the suite cleanup function.
Definition: TestDB.h:163
CU_BOOL fSetUpError
Flag set if the suite setup function failed a CU_ASSERT.
Definition: TestDB.h:177
CU_BOOL fActive
Flag for whether suite is executed during a run.
Definition: TestDB.h:160
CU_BOOL fInTestSetup
Flag set if we are running a test setup function.
Definition: TestDB.h:182
Test case parameters structure.
Definition: TestDB.h:730
const char * pName
Test name.
Definition: TestDB.h:731
CU_TestFunc pTestFunc
Test function.
Definition: TestDB.h:732
CUnit test registry data type.
Definition: TestDB.h:233
unsigned int uiNumberOfTests
Number of tests in the test registry.
Definition: TestDB.h:240
unsigned int uiNumberOfGroups
Deprecated (version 1).
Definition: TestDB.h:238
CU_pSuite pSuite
Pointer to the 1st suite in the test registry.
Definition: TestDB.h:243
unsigned int uiNumberOfSuites
Number of suites in the test registry.
Definition: TestDB.h:237
CU_pSuite pGroup
Deprecated (version 1).
Definition: TestDB.h:244
CUnit test case data type.
Definition: TestDB.h:106
struct CU_Test * pPrev
Pointer to the previous test in linked list.
Definition: TestDB.h:113
CU_BOOL fSkipped
Flag for whether the test was skipped during a run.
Definition: TestDB.h:115
CU_BOOL fSuiteSetup
Flag set if this is a suite setup entry (not an actual test)
Definition: TestDB.h:126
const char * pSkipReason
clock time test ended
Definition: TestDB.h:121
CU_TestFunc pTestFunc
Pointer to the test function.
Definition: TestDB.h:109
CU_BOOL fSuiteCleanup
Flag set if this is a suite cleanup entry (not an actual test)
Definition: TestDB.h:127
unsigned uFailedRuns
Number of times this test has failed.
Definition: TestDB.h:116
struct CU_Test * pNext
Pointer to the next test in linked list.
Definition: TestDB.h:112
CU_BOOL fActive
Flag for whether test is executed during a run.
Definition: TestDB.h:108
jmp_buf * pJumpBuf
Jump buffer for setjmp/longjmp test abort mechanism.
Definition: TestDB.h:110
double dEnded
clock time test started
Definition: TestDB.h:119
char * pName
Test name.
Definition: TestDB.h:107
Deprecated (version 1).
Definition: TestDB.h:787
test_group_t * groups
Test groups.
Definition: TestDB.h:789
char * name
Suite name.
Definition: TestDB.h:788