AutoRegisterSuite

   
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 .

Figure C-2. The template AutoRegisterSuite
figs/utf_ac02.gif

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.



Unit Test Frameworks
Unit Test Frameworks
ISBN: 0596006896
EAN: 2147483647
Year: 2006
Pages: 146
Authors: Paul Hamill

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net