#include <TestDB.h>
CU_TestRegisty is the repository for suites containing unit tests. The test registry maintains a count of the number of CU_Suite objects contained in the registry, as well as a count of the total number of CU_Test objects associated with those suites. It also holds a pointer to the head of the linked list of CU_Suite objects.
With this structure, the user will normally add suites implictly to the internal test registry using CU_add_suite(), and then add tests to each suite using CU_add_test(). Test runs are then initiated using one of the appropriate functions in TestRun.c via one of the interfaces.
Automatic creation and destruction of the internal registry and its objects is available using CU_initialize_registry() and CU_cleanup_registry(), respectively. For internal and testing purposes, the internal registry can be retrieved and assigned. Functions are also provided for creating and destroying independent registries.
Note that earlier versions of CUnit also contained a pointer to a linked list of CU_FailureRecord objects (termed _TestResults). This has been removed from the registry and relocated to TestRun.c.
Data Fields | |
unsigned int | uiNumberOfTests |
Number of tests in the test registry. | |
unsigned int | uiNumberOfSuites |
Number of suites in the test registry. | |
unsigned int | uiNumberOfGroups |
Deprecated (version 1). | |
CU_pSuite | pSuite |
Pointer to the 1st suite in the test registry. | |
CU_pSuite | pGroup |
Deprecated (version 1). |
|
Deprecated (version 1).
|
|
Pointer to the 1st suite in the test registry.
|
|
Deprecated (version 1).
|
|
Number of suites in the test registry.
|
|
Number of tests in the test registry.
|