CUnit Programmers Reference  3.0
Data Fields
CU_TestRegistry Struct Reference

CUnit test registry data type. More...

#include <TestDB.h>

Data Fields

union {
   unsigned int   uiNumberOfSuites
 Number of suites in the test registry.
   unsigned int   uiNumberOfGroups
 Deprecated (version 1). More...
 Union to support v1.1-1 member name.
unsigned int uiNumberOfTests
 Number of tests in the test registry.
union {
   CU_pSuite   pSuite
 Pointer to the 1st suite in the test registry.
   CU_pSuite   pGroup
 Deprecated (version 1). More...
 Union to support v1.1-1 member name.

Detailed Description

CUnit test registry data type.

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 user 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 theregistry and relocated to TestRun.c.

See also

Field Documentation

◆ pGroup

CU_pSuite CU_TestRegistry::pGroup

Deprecated (version 1).

Use pSuite.

◆ uiNumberOfGroups

unsigned int CU_TestRegistry::uiNumberOfGroups

Deprecated (version 1).

Use uiNumberOfSuites.

The documentation for this struct was generated from the following file: