Name

AutoRegisterSuite

Description

The template AutoRegisterSuite (Figure C-2) is not intended for direct usage. It is statically instantiated by the macros CPPUNIT_TEST_SUITE_REGISTRATION() and CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( ). It registers a test of the type TestCaseType. For more details on test registration, see the description of TestFactoryRegistry, later in this appendix.

AutoRegisterSuite belongs to the namespace CppUnit. It is declared and implemented in extensions/AutoRegisterSuite.h.

The template AutoRegisterSuite
Figure C-2. The template AutoRegisterSuite

Declaration

template<typename TestCaseType>
   class AutoRegisterSuite<TestCaseType>

Constructors/Destructors

AutoRegisterSuite( )

Registers the test suite in the global registry.

AutoRegisterSuite(const string& name)

Registers the test suite in the registry specified by name.

Public Methods

None.

Protected/Private Methods

None.

Attributes

None.

Get Unit Test Frameworks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.