diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-04-20 20:54:36 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-04-20 20:54:36 +0000 |
| commit | f05089dffe81419786776b60bc2dc13d2a421a5c (patch) | |
| tree | 8451a33146a505c999a28288fe4574e98f268238 /examples/DumperPlugIn/DumperPlugIn.cpp | |
| parent | c4995a9e022ed586cf4e3f166738dfe01bf51c16 (diff) | |
| download | cppunit-f05089dffe81419786776b60bc2dc13d2a421a5c.tar.gz | |
THANKS: updated
THANKS: updated
* src/cppunit/DynamicLibraryManager.cpp: bugfix: did not pass
library name to exception.
* include/cppunit/TestPath.h:
* src/cppunit/TestPath.cpp: changed into value object.
* src/cppunit/BeosDynamicLibraryManager.cpp: integrated patch from
Shibu Yoshiki for BeOS ('cuppa' project team).
* src/DllPlugInTester/CommandLineParser.h:
* src/DllPlugInTester/CommandLineParser.cpp: added. Command line
parsing.
* src/DllPlugInTester/DllPlugInTester.cpp: full command line support
with parameters for plug-ins.
* src/DllPlugInTester/makefile.am:
* examples/simple/makefile.am:
* examples/cppunittest/makefile.am: integrated Jeffrey Morgan patch,
Unix side should be working again.
* examples/ReadMe.txt: added. Brief description of each example.
* examples/cppunittest/CppUnitTestPlugIn.cpp:
* examples/cppunittest/CppUnitTestPlugIn.dsp: added. New project to
build CppUnit's test suite as a test plug-in.
* examples/cppunittest/CppUnitTestSuite.cpp: updated. Use new
helper macros to create the test suite hierarchy.
* examples/simple/simple_plugin.opt: added. Contains debug tab
settings.
* examples/ClockerPlugIn/ClockerListener.cpp:
* examples/ClockerPlugIn/ClockerListener.h:
* examples/ClockerPlugIn/Timer.cpp:
* examples/ClockerPlugIn/Timer.h:
* examples/ClockerPlugIn/WinNtTimer.cpp:
* examples/ClockerPlugIn/WinNtTimer.h:
* examples/ClockerPlugIn/ClockerPlugIn.cpp:
* examples/ClockerPlugIn/ClockerPlugIn.dsp: added. test listener
plug-in that times tests.
* examples/DumperPlugIn/DumperListener.cpp:
* examples/DumperPlugIn/DumperListener.h:
* examples/DumperPlugIn/DumperPlugIn.cpp:
* examples/DumperPlugIn/DumperPlugIn.dsp: added. test listener
plug-in that dump the test tree.
Diffstat (limited to 'examples/DumperPlugIn/DumperPlugIn.cpp')
| -rw-r--r-- | examples/DumperPlugIn/DumperPlugIn.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/examples/DumperPlugIn/DumperPlugIn.cpp b/examples/DumperPlugIn/DumperPlugIn.cpp new file mode 100644 index 0000000..0131d14 --- /dev/null +++ b/examples/DumperPlugIn/DumperPlugIn.cpp @@ -0,0 +1,55 @@ +#include <cppunit/TestResult.h> +#include <cppunit/plugin/TestPlugIn.h> +#include "DumperListener.h" + + + +class DumperPlugIn : public CppUnitTestPlugIn +{ +public: + DumperPlugIn() + : m_dumper( NULL ) + { + } + + ~DumperPlugIn() + { + delete m_dumper; + } + + + void initialize( CppUnit::TestFactoryRegistry *registry, + const CppUnit::Parameters ¶meters ) + { + bool flatten = false; + if ( parameters.size() > 0 && parameters[0] == "flat" ) + flatten = true; + + m_dumper = new DumperListener( flatten ); + } + + + void addListener( CppUnit::TestResult *eventManager ) + { + eventManager->addListener( m_dumper ); + } + + + void removeListener( CppUnit::TestResult *eventManager ) + { + eventManager->removeListener( m_dumper ); + } + + + void uninitialize( CppUnit::TestFactoryRegistry *registry ) + { + } + +private: + DumperListener *m_dumper; +}; + + +CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( DumperPlugIn ); + +CPPUNIT_TESTPLUGIN_MAIN();
\ No newline at end of file |
