[Cppunit-cvs] cppunit2/doc cpput.dox, 1.6, 1.7 cpput_todo.dox, 1.2, 1.3
Brought to you by:
blep
From: Baptiste L. <bl...@us...> - 2007-08-15 11:21:00
|
Update of /cvsroot/cppunit/cppunit2/doc In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8069/doc Modified Files: cpput.dox cpput_todo.dox Log Message: Added support for light test fixture (a la CppUnitLite). See lightfixture.h and example/light_fixture. Added support for direct declaration and registration of test in plain C function. See testfunction.h and example/test_function. Index: cpput.dox =================================================================== RCS file: /cvsroot/cppunit/cppunit2/doc/cpput.dox,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** cpput.dox 7 Sep 2006 22:45:50 -0000 1.6 --- cpput.dox 15 Aug 2007 11:20:57 -0000 1.7 *************** *** 64,67 **** --- 64,72 ---- A test case is usually created using CppUT::makeTestCase() that instantiate CppUT::TestCase. + + Notes that test case instantiation is usually only done when you need to create your own + convenience test case macro or you are populating a TestSuite with parametrized TestCase. + The framework provides severable way to create and register test case, see \ref section_lightfixture, + \ref section_testfixture, \ref section_testfunction. \subsection section_assertions Making assertions *************** *** 215,218 **** --- 220,253 ---- to abort the test. + \subsection section_testfixture Creating TestCase: TestFixture + + A TestFixture is a class that implements multiple test cases sharing the same setUp/tearDown steps. + Test cases are implements as "void test()" member function and each test case has its own instance + of the test fixture. + + A TestFixture support the following features: + - TestFixture may be a template class + - polymorphism: you can subclass a TestFixture and adds more test or override setUp/teardown + virtual member functions. + - TestExtendedData can be specified for each test + - TestFixture test cases are grouped within a TestSuite + - macro usage is limited to a declaration of the test member function and is clearly separated + from code. + + \subsection section_lightfixture Creating TestCase: light Fixture + + A Light test fixture is similar to a TestFixture but does not support the following features: + - templated test class + - can not subclass a light test fixture and share common test cases + - macro usage is intrusive and hides member function declaration. + + On the positive side, it is easier on the wrist. + + \subsection section_testfunction Creating TestCase: test functions + + A test case can be implemented as a plain C function "void test()". + + + <hr> \section section_projectlinks Project links *************** *** 220,225 **** - <a HREF="http://www.sourceforge.net/projects/cppunit">cppunit sourceforge project</a> - - <hr> \section _rlinks Related links --- 255,258 ---- Index: cpput_todo.dox =================================================================== RCS file: /cvsroot/cppunit/cppunit2/doc/cpput_todo.dox,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cpput_todo.dox 3 Sep 2006 07:58:58 -0000 1.2 --- cpput_todo.dox 15 Aug 2007 11:20:57 -0000 1.3 *************** *** 120,124 **** <hr> ! \section todo_light_unit_tests Lightweight unit test declarations Needs: provides an alternative mecanism to implement fixture with less code --- 120,124 ---- <hr> ! \section todo_light_unit_tests Lightweight unit test declarations [DONE] Needs: provides an alternative mecanism to implement fixture with less code *************** *** 337,340 **** --- 337,346 ---- then the later override the other one. + <hr> + \section todo_testfunction_extendeddata Add support for TestExtendedData in test function. + Adds variant ..._WITH_SPECIFICS for all testfunction macros. + \section todo_registry_default Handle orphan test suite in the Registry + Provides a feature to automatically parent orphan test suite in the Registry, to either + the default test suite or a specific test suite. */ \ No newline at end of file |