Blame doc/other_documentation.dox

Packit Service e31359
/**
Packit Service e31359
 \mainpage
Packit Service e31359
 
Packit Service e31359
 \section _history History
Packit Service e31359
 The first port of JUnit to C++ was done
Packit Service e31359
 by Michael Feathers. His versions
Packit Service e31359
 can be found on the 
Packit Service e31359
 
Packit Service e31359
 XProgramming software page. They are os-specific,
Packit Service e31359
 so Jerome Lacoste provided a port to Unix/Solaris.
Packit Service e31359
 His version can be found on the same page.
Packit Service e31359
 The %CppUnit project has combined and built on this work.
Packit Service e31359
Packit Service e31359
 \section _usage Usage
Packit Service e31359
 Take a look into the \ref cppunit_cookbook.
Packit Service e31359
 It gives a quick start into using this 
Packit Service e31359
 testing framework. Modules give
Packit Service e31359
 you a organized view of %CppUnit classes.
Packit Service e31359
Packit Service e31359
 (Notes to newbies, you may want to check out \ref money_example,
Packit Service e31359
 a work in progress, but the project is provided with %CppUnit).
Packit Service e31359
Packit Service e31359
 For a discussion on %CppUnit, check 
Packit Service e31359
 
Packit Service e31359
 the WikiWiki Pages on CppUnit. There you can also
Packit Service e31359
 find the original versions and various ports to other
Packit Service e31359
 OSses and languages.
Packit Service e31359
 
Packit Service e31359
 \section _license License
Packit Service e31359
 This library is released under
Packit Service e31359
 the GNU
Packit Service e31359
 
Packit Service e31359
 Lesser General Public License.
Packit Service e31359
Packit Service e31359
 \author Eric Sommerlade (sommerlade@gmx.net)
Packit Service e31359
 \author Michael Feathers (mfeathers@objectmentor.com)
Packit Service e31359
 \author Jerome Lacoste (lacostej@altern.org)
Packit Service e31359
 \author Baptiste Lepilleur <blep@users.sourceforge.net>
Packit Service e31359
 \author Bastiaan Bakker <bastiaan.bakker@lifeline.nl>
Packit Service e31359
 \author Steve Robbins <smr99@sourceforge.net>
Packit Service e31359
 */
Packit Service e31359
Packit Service e31359
Packit Service e31359
Packit Service e31359
/*! \defgroup WritingTestFixture Writing test fixture
Packit Service e31359
 */
Packit Service e31359
Packit Service e31359
/*! \defgroup Assertions Making assertions
Packit Service e31359
 */
Packit Service e31359
Packit Service e31359
/*! \defgroup CreatingTestSuite Creating TestSuite
Packit Service e31359
 */
Packit Service e31359
Packit Service e31359
/*! \defgroup ExecutingTest Executing test
Packit Service e31359
 */
Packit Service e31359
Packit Service e31359
/*! \defgroup TrackingTestExecution Tracking test execution
Packit Service e31359
 */
Packit Service e31359
Packit Service e31359
/*! \defgroup WritingTestResult Writing test result
Packit Service e31359
 */
Packit Service e31359
Packit Service e31359
/*! \defgroup BrowsingCollectedTestResult Browsing collected test result
Packit Service e31359
 */
Packit Service e31359
Packit Service e31359
/*! \defgroup CreatingNewAssertions Creating custom assertions
Packit Service e31359
 */
Packit Service e31359
Packit Service e31359
/*! \defgroup WritingTestPlugIn Writing Test Plug-in
Packit Service e31359
 *
Packit Service e31359
 * Creating a test plug-in is really simple:
Packit Service e31359
 * - make your project a dynamic library (with VC++, choose Win32 Dynamic Library in
Packit Service e31359
 *   the project wizard), and link against the dynamic library version of %CppUnit
Packit Service e31359
 *   (cppunit*_dll.lib for VC++).
Packit Service e31359
 * - in a cpp file, include TestPlugIn.h, and use the macro CPPUNIT_PLUGIN_IMPLEMENT()
Packit Service e31359
 *   to declare the test plug-in.
Packit Service e31359
 * - That's it, you're done! All the tests registered using the TestFactoryRegistry,
Packit Service e31359
 *   CPPUNIT_TEST_SUITE_NAMED_REGISTRATION, or CPPUNIT_TEST_SUITE_REGISTRATION will
Packit Service e31359
 *   be visible to other plug-in and to the DllPlugInRunner.
Packit Service e31359
 *
Packit Service e31359
 * Example:
Packit Service e31359
 * \code
Packit Service e31359
 * #include <cppunit/include/plugin/TestPlugIn.h>
Packit Service e31359
 *
Packit Service e31359
 * CPPUNIT_PLUGIN_IMPLEMENT();
Packit Service e31359
 * \endcode
Packit Service e31359
 *
Packit Service e31359
 * The interface CppUnitTestPlugIn is automatically implemented by the previous
Packit Service e31359
 * macro. You can define your own implementation.
Packit Service e31359
 *
Packit Service e31359
 * To provide your custom implementation of the plug-in interface, you must:
Packit Service e31359
 * - create a class that implements the CppUnitTestPlugIn interface
Packit Service e31359
 * - use CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL() with your class to export
Packit Service e31359
 *   the plug-in interface
Packit Service e31359
 * - implements the 'main' function with CPPUNIT_PLUGIN_IMPLEMENT_MAIN().
Packit Service e31359
 *
Packit Service e31359
 * Some of the reason you may want to do this:
Packit Service e31359
 * - You do not use the TestFactoryRegistry to register your test.
Packit Service e31359
 * - You want to create a custom listener to use with DllPlugInRunner.
Packit Service e31359
 * - You want to do initialize some globale resources before running the test
Packit Service e31359
 *   (setting up COM for example).
Packit Service e31359
 *   
Packit Service e31359
 * See CppUnitTestPlugIn for further detail on how to do this.
Packit Service e31359
 *
Packit Service e31359
 * Creating your own test plug-in with VC++:
Packit Service e31359
 * - Create a new "Win32 Dynamic Library" project, choose the empty template
Packit Service e31359
 * - For the Debug Configuration, add cppunitd_dll.lib to 
Packit Service e31359
 *   'Project Settings/Link/Object/Libariries modules', and for the Release
Packit Service e31359
 *   Configuration, add cppunit_dll.lib.
Packit Service e31359
 * - For All Configuration, in 'C++/Preprocessor/Preprocessors definitions',
Packit Service e31359
 *   add the symbol 'CPPUNIT_DLL' at the end of the line (it means that
Packit Service e31359
 *   you are linking against cppunit dll).
Packit Service e31359
 * - Create a 'main' file that contains:
Packit Service e31359
\verbatim
Packit Service e31359
#include <cppunit/plugin/TestPlugIn.h>
Packit Service e31359
Packit Service e31359
CPPUNIT_PLUGIN_IMPLEMENT();\endverbatim
Packit Service e31359
 * - Add your tests
Packit Service e31359
 * - You're done !
Packit Service e31359
 *
Packit Service e31359
 * See examples/simple/simple_plugin.dsp for an example.
Packit Service e31359
 *
Packit Service e31359
 * Notes to VC++ users: 
Packit Service e31359
 * - you can run a post-build check on the plug-in. Add the following line to your
Packit Service e31359
 *   post-build tab: "DllPlugInTesterd_dll.exe $(TargetPath)". DllPlugInTesterd_dll.exe
Packit Service e31359
 *   need to be some place were it can be found (path, ...), or you need to
Packit Service e31359
 *   indicate the correct path. 
Packit Service e31359
 *   $(TargetPath) is the filename of your plug-in.
Packit Service e31359
 * - you can debug your DLL, set the executable for debug session to the plug-in 
Packit Service e31359
 *   runner, and the name of the DLL in the program arguments ($(xxx) won't work
Packit Service e31359
 *   this time).
Packit Service e31359
 *
Packit Service e31359
 * How does it works ?
Packit Service e31359
 *
Packit Service e31359
 * When %CppUnit is linked as a DLL, the singleton used for the TestFactoryRegistry
Packit Service e31359
 * is the same for the plug-in runner (also linked against %CppUnit DLL). This means
Packit Service e31359
 * that the tests registered with the macros (at static initialization) are 
Packit Service e31359
 * registered in the same registry. As soon as a DLL is loaded by the PlugInManager,
Packit Service e31359
 * the DLL static variable are constructed and the test registered to the 
Packit Service e31359
 * TestFactoryRegistry.
Packit Service e31359
 *
Packit Service e31359
 * After loading the DLL, the PlugInManager look-up a specific function exported by
Packit Service e31359
 * the DLL. That function returns a pointer on the plug-in interface, which is later
Packit Service e31359
 * used by the PlugInManager.
Packit Service e31359
 *
Packit Service e31359
 * \see CreatingTestSuite.
Packit Service e31359
 */