CppUnit - The Unit Testing Library

CppUnit project page | FAQ

Public Member Functions | Private Attributes | List of all members
AutoRegisterSuite< TestCaseType > Class Template Reference

(Implementation) Automatically register the test suite of the specified type. More...

`#include <AutoRegisterSuite.h>`

Collaboration diagram for AutoRegisterSuite< TestCaseType >:
[legend]

## Public Member Functions
| AutoRegisterSuite ()
| Auto-register the suite factory in the global registry. More...
| AutoRegisterSuite (const std::string &name)
| Auto-register the suite factory in the specified registry. More...
| ~AutoRegisterSuite ()

## Private Attributes
TestFactoryRegistry * | m_registry
TestSuiteFactory< TestCaseType > | m_factory

## Detailed Description

### template<class TestCaseType>
class AutoRegisterSuite< TestCaseType >

(Implementation) Automatically register the test suite of the specified type.

You should not use this class directly. Instead, use the following macros:

- CPPUNIT_TEST_SUITE_REGISTRATION()
- CPPUNIT_TEST_SUITE_NAMED_REGISTRATION()

This object will register the test returned by TestCaseType::suite() when constructed to the test registry.

This object is intented to be used as a static variable.

Parameters

  TestCaseType | Type of the test case which suite is registered.

See also
  CPPUNIT_TEST_SUITE_REGISTRATION, CPPUNIT_TEST_SUITE_NAMED_REGISTRATION
  CppUnit::TestFactoryRegistry.

## Constructor & Destructor Documentation

## ◆ AutoRegisterSuite() [1/2]

template<class TestCaseType >

AutoRegisterSuite< TestCaseType >::AutoRegisterSuite | ( |  | ) |
| inline

Auto-register the suite factory in the global registry.

## ◆ AutoRegisterSuite() [2/2]

template<class TestCaseType >

AutoRegisterSuite< TestCaseType >::AutoRegisterSuite | ( | const std::string & | name | ) |
| inline

Auto-register the suite factory in the specified registry.

Parameters

  name | Name of the registry.

## ◆ ~AutoRegisterSuite()

template<class TestCaseType >

AutoRegisterSuite< TestCaseType >::~AutoRegisterSuite | ( |  | ) |
| inline

## Member Data Documentation

## ◆ m_factory

template<class TestCaseType >

TestSuiteFactory<TestCaseType> AutoRegisterSuite< TestCaseType >::m_factory
| private

## ◆ m_registry

template<class TestCaseType >

TestFactoryRegistry* AutoRegisterSuite< TestCaseType >::m_registry
| private

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

- AutoRegisterSuite.h

| Send comments to: CppUnit Developers