Wednesday, November 4, 2009

AutoRegisterSuite











 < Day Day Up > 





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









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.















     < Day Day Up > 



    No comments:

    Post a Comment