summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBaptiste Lepilleur <gaiacrtn@free.fr>2002-04-20 20:54:36 +0000
committerBaptiste Lepilleur <gaiacrtn@free.fr>2002-04-20 20:54:36 +0000
commitf05089dffe81419786776b60bc2dc13d2a421a5c (patch)
tree8451a33146a505c999a28288fe4574e98f268238 /examples
parentc4995a9e022ed586cf4e3f166738dfe01bf51c16 (diff)
downloadcppunit-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')
-rw-r--r--examples/ClockerPlugIn/ClockerListener.cpp192
-rw-r--r--examples/ClockerPlugIn/ClockerListener.h96
-rw-r--r--examples/ClockerPlugIn/ClockerPlugIn.cpp55
-rw-r--r--examples/ClockerPlugIn/ClockerPlugIn.dsp209
-rw-r--r--examples/ClockerPlugIn/Makefile.am4
-rw-r--r--examples/ClockerPlugIn/ReadMe.txt14
-rw-r--r--examples/ClockerPlugIn/Timer.cpp28
-rw-r--r--examples/ClockerPlugIn/Timer.h32
-rw-r--r--examples/ClockerPlugIn/WinNtTimer.cpp77
-rw-r--r--examples/ClockerPlugIn/WinNtTimer.h36
-rw-r--r--examples/DumperPlugIn/DumperListener.cpp120
-rw-r--r--examples/DumperPlugIn/DumperListener.h67
-rw-r--r--examples/DumperPlugIn/DumperPlugIn.cpp55
-rw-r--r--examples/DumperPlugIn/DumperPlugIn.dsp107
-rw-r--r--examples/DumperPlugIn/Makefile.am2
-rw-r--r--examples/Makefile.am2
-rw-r--r--examples/ReadMe.txt21
-rw-r--r--examples/cppunittest/CppUnitTestMain.cpp4
-rw-r--r--examples/cppunittest/CppUnitTestMain.dsp2
-rw-r--r--examples/cppunittest/CppUnitTestPlugIn.cpp5
-rw-r--r--examples/cppunittest/CppUnitTestPlugIn.dsp351
-rw-r--r--examples/cppunittest/CppUnitTestSuite.cpp33
-rw-r--r--examples/cppunittest/Makefile.am4
-rw-r--r--examples/examples.dsw45
-rw-r--r--examples/examples.optbin127488 -> 139264 bytes
-rw-r--r--examples/msvc6/CppUnitTestApp/CppUnitTestApp.clw74
-rw-r--r--examples/msvc6/CppUnitTestApp/CppUnitTestApp.cpp3
-rw-r--r--examples/simple/ExampleTestCase.h3
-rw-r--r--examples/simple/Makefile.am1
-rw-r--r--examples/simple/simple.dsp12
-rw-r--r--examples/simple/simple_plugin.dsp6
-rw-r--r--examples/simple/simple_plugin.optbin0 -> 49664 bytes
32 files changed, 1547 insertions, 113 deletions
diff --git a/examples/ClockerPlugIn/ClockerListener.cpp b/examples/ClockerPlugIn/ClockerListener.cpp
new file mode 100644
index 0000000..fafbaf8
--- /dev/null
+++ b/examples/ClockerPlugIn/ClockerListener.cpp
@@ -0,0 +1,192 @@
+// //////////////////////////////////////////////////////////////////////////
+// Implementation file ClockerListener.cpp for class ClockerListener
+// (c)Copyright 2000, Baptiste Lepilleur.
+// Created: 2002/04/19
+// //////////////////////////////////////////////////////////////////////////
+#include <cppunit/Test.h>
+#include <iostream>
+#include "ClockerListener.h"
+#include <stdio.h>
+
+
+ClockerListener::ClockerListener( bool flatten )
+ : m_flatten( flatten )
+ , m_testCount( 0 )
+ , m_totalTestCaseTime( 0 )
+{
+}
+
+
+ClockerListener::~ClockerListener()
+{
+}
+
+
+void
+ClockerListener::startTestRun( CppUnit::Test *test,
+ CppUnit::TestResult *eventManager )
+{
+ m_tests.reserve( test->countTestCases() *2 );
+}
+
+
+void
+ClockerListener::startTest( CppUnit::Test *test )
+{
+ enterTest( test, false );
+ ++m_testCount;
+}
+
+
+void
+ClockerListener::endTest( CppUnit::Test *test )
+{
+ exitTest( test, false );
+}
+
+
+void
+ClockerListener::startSuite( CppUnit::Test *suite )
+{
+ enterTest( suite, true );
+}
+
+
+void
+ClockerListener::endSuite( CppUnit::Test *suite )
+{
+ exitTest( suite, true );
+}
+
+
+void
+ClockerListener::endTestRun( CppUnit::Test *test,
+ CppUnit::TestResult *eventManager )
+{
+ printStatistics();
+}
+
+
+void
+ClockerListener::enterTest( CppUnit::Test *test,
+ bool isSuite )
+{
+ m_currentPath.add( test );
+
+ int testIndex = m_tests.size();
+ if ( !m_testIndexes.empty() )
+ m_tests[ m_testIndexes.top() ].m_childIndexes.push_back( testIndex );
+ m_testIndexes.push( testIndex );
+
+ TestInfo info;
+ info.m_timer.start();
+ info.m_path = m_currentPath;
+ info.m_isSuite = isSuite;
+
+ m_tests.push_back( info );
+}
+
+
+void
+ClockerListener::exitTest( CppUnit::Test *test,
+ bool isSuite )
+{
+ m_tests[ m_testIndexes.top() ].m_timer.finish();
+ m_totalTestCaseTime += m_tests.back().m_timer.elapsedTime();
+
+ m_currentPath.up();
+ m_testIndexes.pop();
+}
+
+
+void
+ClockerListener::printStatistics() const
+{
+ printTest( m_tests[0], "" );
+ std::cout << std::endl;
+ std::cout << "Total elapsed time: ";
+ printTestTime( m_tests[0].m_timer.elapsedTime() );
+ std::cout << ", average test case time: ";
+ double average = 0;
+ if ( m_testCount > 0 )
+ average = m_totalTestCaseTime / m_testCount;
+ printTestTime( average );
+}
+
+
+void
+ClockerListener::printTest( const TestInfo &info,
+ const std::string &indentString ) const
+{
+ std::string indent = indentString;
+ const int indentLength = 3;
+
+ if ( !m_flatten )
+ printTestIndent( indentString, indentLength );
+
+ printTestTime( info.m_timer.elapsedTime() );
+
+ if ( m_flatten )
+ printFlattenedTestName( info );
+ else
+ printTestName( info );
+
+ std::cout << std::endl;
+
+ if ( info.m_childIndexes.empty() )
+ indent+= std::string( indentLength, ' ' );
+ else
+ indent+= "|" + std::string( indentLength -1, ' ' );
+
+ for ( int index =0; index < info.m_childIndexes.size(); ++index )
+ printTest( m_tests[ info.m_childIndexes[ index ] ], indent );
+}
+
+
+void
+ClockerListener::printTestIndent( const std::string &indent,
+ const int indentLength ) const
+{
+ if ( indent.empty() )
+ return;
+
+ std::cout << " ";
+ std::cout << indent.substr( 0, indent.length() - indentLength ) ;
+ std::cout << "+" << std::string( indentLength -1, '-' );
+}
+
+
+void
+ClockerListener::printTestTime( double elapsedSeconds ) const
+{
+ char buffer[320];
+ const char *format;
+ if ( elapsedSeconds < 1 )
+ format = "(%2.3fs) ";
+ else if ( elapsedSeconds < 10 )
+ format = "(%3.2fs) ";
+ else if (elapsedSeconds < 100 )
+ format = "(%4.1fs) ";
+ else
+ format = "(%5fs) ";
+
+ ::sprintf( buffer, format, elapsedSeconds );
+
+ std::cout << buffer;
+}
+
+
+void
+ClockerListener::printFlattenedTestName( const TestInfo &info ) const
+{
+ std::cout << info.m_path.toString();
+ if ( info.m_isSuite )
+ std::cout << "/";
+}
+
+
+void
+ClockerListener::printTestName( const TestInfo &info ) const
+{
+ std::cout << info.m_path.getChildTest()->getName();
+}
diff --git a/examples/ClockerPlugIn/ClockerListener.h b/examples/ClockerPlugIn/ClockerListener.h
new file mode 100644
index 0000000..b256380
--- /dev/null
+++ b/examples/ClockerPlugIn/ClockerListener.h
@@ -0,0 +1,96 @@
+// //////////////////////////////////////////////////////////////////////////
+// Header file ClockerListener.h for class ClockerListener
+// (c)Copyright 2000, Baptiste Lepilleur.
+// Created: 2002/04/19
+// //////////////////////////////////////////////////////////////////////////
+#ifndef CLOCKERLISTENER_H
+#define CLOCKERLISTENER_H
+
+#include <cppunit/TestListener.h>
+#include <cppunit/TestPath.h>
+#include <stack>
+#include <vector>
+
+#ifdef CLOCKER_USE_WINNTTIMER
+#include "WinNtTimer.h"
+typedef WinNtTimer Timer;
+#else
+#include "Timer.h"
+#endif
+
+/// TestListener that prints a flatten or hierarchical view of the test tree.
+class ClockerListener : public CppUnit::TestListener
+{
+public:
+ ClockerListener( bool flatten );
+
+ virtual ~ClockerListener();
+
+ void startTestRun( CppUnit::Test *test,
+ CppUnit::TestResult *eventManager );
+
+ void startTest( CppUnit::Test *test );
+
+ void endTest( CppUnit::Test *test );
+
+ void startSuite( CppUnit::Test *suite );
+
+ void endSuite( CppUnit::Test *suite );
+
+ void endTestRun( CppUnit::Test *test,
+ CppUnit::TestResult *eventManager );
+
+private:
+ struct TestInfo
+ {
+ CppUnit::TestPath m_path;
+ Timer m_timer;
+ bool m_isSuite;
+ std::vector<int> m_childIndexes;
+ };
+
+ void enterTest( CppUnit::Test *test,
+ bool isSuite );
+
+ void exitTest( CppUnit::Test *test,
+ bool isSuite );
+
+ void printStatistics() const;
+
+ void printTest( const TestInfo &info,
+ const std::string &indentString ) const;
+
+ void printTestIndent( const std::string &indent,
+ const int indentLength ) const;
+
+ void printTestTime( double elapsedSeconds ) const;
+
+ void printFlattenedTestName( const TestInfo &info ) const;
+
+ void printTestName( const TestInfo &info ) const;
+
+ /// Prevents the use of the copy constructor.
+ ClockerListener( const ClockerListener &other );
+
+ /// Prevents the use of the copy operator.
+ void operator =( const ClockerListener &other );
+
+private:
+ bool m_flatten;
+ CppUnit::TestPath m_currentPath;
+
+ int m_testCount;
+ double m_totalTestCaseTime;
+
+ std::stack<int> m_testIndexes;
+ std::vector<TestInfo> m_tests;
+};
+
+
+
+// Inlines methods for ClockerListener:
+// -----------------------------------
+
+
+
+#endif // CLOCKERLISTENER_H
diff --git a/examples/ClockerPlugIn/ClockerPlugIn.cpp b/examples/ClockerPlugIn/ClockerPlugIn.cpp
new file mode 100644
index 0000000..8943629
--- /dev/null
+++ b/examples/ClockerPlugIn/ClockerPlugIn.cpp
@@ -0,0 +1,55 @@
+#include <cppunit/TestResult.h>
+#include <cppunit/plugin/TestPlugIn.h>
+#include "ClockerListener.h"
+
+
+
+class ClockerPlugIn : public CppUnitTestPlugIn
+{
+public:
+ ClockerPlugIn()
+ : m_dumper( NULL )
+ {
+ }
+
+ ~ClockerPlugIn()
+ {
+ delete m_dumper;
+ }
+
+
+ void initialize( CppUnit::TestFactoryRegistry *registry,
+ const CppUnit::Parameters &parameters )
+ {
+ bool flatten = false;
+ if ( parameters.size() > 0 && parameters[0] == "flat" )
+ flatten = true;
+
+ m_dumper = new ClockerListener( 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:
+ ClockerListener *m_dumper;
+};
+
+
+CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( ClockerPlugIn );
+
+CPPUNIT_TESTPLUGIN_MAIN(); \ No newline at end of file
diff --git a/examples/ClockerPlugIn/ClockerPlugIn.dsp b/examples/ClockerPlugIn/ClockerPlugIn.dsp
new file mode 100644
index 0000000..98e206a
--- /dev/null
+++ b/examples/ClockerPlugIn/ClockerPlugIn.dsp
@@ -0,0 +1,209 @@
+# Microsoft Developer Studio Project File - Name="ClockerPlugIn" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=ClockerPlugIn - Win32 Debug NtTimer
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "ClockerPlugIn.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "ClockerPlugIn.mak" CFG="ClockerPlugIn - Win32 Debug NtTimer"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "ClockerPlugIn - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "ClockerPlugIn - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "ClockerPlugIn - Win32 Debug NtTimer" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "ClockerPlugIn - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CLOCKERPLUGIN_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /GX /O2 /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUNIT_DLL" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunit_dll.lib /nologo /dll /machine:I386 /out:"../../lib/ClockerPlugIn.dll" /libpath:"../../lib/"
+
+!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CLOCKERPLUGIN_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUNIT_DLL" /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunitd_dll.lib /nologo /dll /debug /machine:I386 /out:"../../lib/ClockerPlugInd.dll" /pdbtype:sept /libpath:"../../lib/"
+
+!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug NtTimer"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug NtTimer"
+# PROP BASE Intermediate_Dir "Debug NtTimer"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "DebugNtTimer"
+# PROP Intermediate_Dir "DebugNtTimer"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUNIT_DLL" /FD /GZ /c
+# SUBTRACT BASE CPP /YX
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUNIT_DLL" /D "CLOCKER_USE_WINNTTIMER" /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunitd_dll.lib /nologo /dll /debug /machine:I386 /out:"../../lib/ClockerPlugInd.dll" /pdbtype:sept /libpath:"../../lib/"
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunitd_dll.lib /nologo /dll /debug /machine:I386 /out:"../../lib/ClockerPlugInNtd.dll" /pdbtype:sept /libpath:"../../lib/"
+
+!ENDIF
+
+# Begin Target
+
+# Name "ClockerPlugIn - Win32 Release"
+# Name "ClockerPlugIn - Win32 Debug"
+# Name "ClockerPlugIn - Win32 Debug NtTimer"
+# Begin Source File
+
+SOURCE=.\ClockerListener.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\ClockerListener.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\ClockerPlugIn.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Makefile.am
+# End Source File
+# Begin Source File
+
+SOURCE=.\Timer.cpp
+
+!IF "$(CFG)" == "ClockerPlugIn - Win32 Release"
+
+!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug"
+
+!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug NtTimer"
+
+# PROP Exclude_From_Build 1
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\Timer.h
+
+!IF "$(CFG)" == "ClockerPlugIn - Win32 Release"
+
+!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug"
+
+!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug NtTimer"
+
+# PROP Exclude_From_Build 1
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\WinNtTimer.cpp
+
+!IF "$(CFG)" == "ClockerPlugIn - Win32 Release"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug NtTimer"
+
+# PROP BASE Exclude_From_Build 1
+# PROP Intermediate_Dir "DebugNtTimer"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\WinNtTimer.h
+
+!IF "$(CFG)" == "ClockerPlugIn - Win32 Release"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "ClockerPlugIn - Win32 Debug NtTimer"
+
+# PROP BASE Exclude_From_Build 1
+
+!ENDIF
+
+# End Source File
+# End Target
+# End Project
diff --git a/examples/ClockerPlugIn/Makefile.am b/examples/ClockerPlugIn/Makefile.am
new file mode 100644
index 0000000..2d828c4
--- /dev/null
+++ b/examples/ClockerPlugIn/Makefile.am
@@ -0,0 +1,4 @@
+EXTRA_DIST = WinNtTimer.h Timer.h ClockerListener.h \
+ Timer.cpp ClockerListener.cpp WinNtTimer.cpp \
+ ClockerPlugIn.cpp ClockerPlugIn.dsp
+
diff --git a/examples/ClockerPlugIn/ReadMe.txt b/examples/ClockerPlugIn/ReadMe.txt
new file mode 100644
index 0000000..6893fc6
--- /dev/null
+++ b/examples/ClockerPlugIn/ReadMe.txt
@@ -0,0 +1,14 @@
+A plug-ins that track tests and test suites running time. A demonstration of TestListener and
+test plug-in.
+
+Don't use this to profile your application, use a Profiler.
+
+Usage:
+
+The plug-in accept the option "flat" to generate a flattened view of the test tree.
+
+DllPlugInRunnerd.exe ClockerPlugInd.dll
+or
+DllPlugInRunnerd.exe ClockerPlugInd.dll=flat
+
+
diff --git a/examples/ClockerPlugIn/Timer.cpp b/examples/ClockerPlugIn/Timer.cpp
new file mode 100644
index 0000000..6719817
--- /dev/null
+++ b/examples/ClockerPlugIn/Timer.cpp
@@ -0,0 +1,28 @@
+// //////////////////////////////////////////////////////////////////////////
+// Implementation file Timer.cpp for class Timer
+// (c)Copyright 2000, Baptiste Lepilleur.
+// Created: 2002/04/19
+// //////////////////////////////////////////////////////////////////////////
+
+#include "Timer.h"
+
+
+void
+Timer::start()
+{
+ m_beginTime = clock();
+}
+
+
+void
+Timer::finish()
+{
+ m_elapsedTime = double(clock() - m_beginTime) / CLOCKS_PER_SEC;
+}
+
+
+double
+Timer::elapsedTime() const
+{
+ return m_elapsedTime;
+}
diff --git a/examples/ClockerPlugIn/Timer.h b/examples/ClockerPlugIn/Timer.h
new file mode 100644
index 0000000..e2b3449
--- /dev/null
+++ b/examples/ClockerPlugIn/Timer.h
@@ -0,0 +1,32 @@
+// //////////////////////////////////////////////////////////////////////////
+// Header file Timer.h for class Timer
+// (c)Copyright 2000, Baptiste Lepilleur.
+// Created: 2002/04/19
+// //////////////////////////////////////////////////////////////////////////
+#ifndef TIMER_H
+#define TIMER_H
+
+#include <time.h>
+
+/// A Timer.
+class Timer
+{
+public:
+ void start();
+ void finish();
+
+ double elapsedTime() const;
+
+private:
+ clock_t m_beginTime;
+ double m_elapsedTime;
+};
+
+
+
+// Inlines methods for Timer:
+// --------------------------
+
+
+
+#endif // TIMER_H
diff --git a/examples/ClockerPlugIn/WinNtTimer.cpp b/examples/ClockerPlugIn/WinNtTimer.cpp
new file mode 100644
index 0000000..87546a2
--- /dev/null
+++ b/examples/ClockerPlugIn/WinNtTimer.cpp
@@ -0,0 +1,77 @@
+// //////////////////////////////////////////////////////////////////////////
+// Implementation file WinNtTimer.cpp for class WinNtTimer
+// (c)Copyright 2000, Baptiste Lepilleur.
+// Created: 2002/04/19
+// //////////////////////////////////////////////////////////////////////////
+
+#include "WinNtTimer.h"
+
+
+/*! Returns time spent in the thread.
+ * @param rquadTime Receive the time spent in the thread (user+kernel time)
+ * in unit of 100 nano-seconds.
+ * In pratice, the effective resolution is 10ms !!!
+ *
+ * @return \c true if sucess, \c false otherwise.
+ */
+static bool
+GetThreadSpentTime( LONGLONG &rquadTime )
+{
+ FILETIME timeCreation;
+ FILETIME timeExit;
+ FILETIME timeKernel;
+ FILETIME timeUser;
+ if ( !::GetThreadTimes( ::GetCurrentThread(),
+ &timeCreation,
+ &timeExit,
+ &timeKernel,
+ &timeUser) )
+ {
+ rquadTime = 0;
+ return false;
+ }
+
+ LARGE_INTEGER lintKernel;
+ lintKernel.LowPart = timeKernel.dwLowDateTime;
+ lintKernel.HighPart = timeKernel.dwHighDateTime;
+
+ LARGE_INTEGER lintUser;
+ lintUser.LowPart = timeUser.dwLowDateTime;
+ lintUser.HighPart = timeUser.dwHighDateTime;
+
+ rquadTime = lintKernel.QuadPart + lintUser.QuadPart;
+
+ return true;
+}
+
+
+
+void
+WinNtTimer::start()
+{
+ m_isValid = GetThreadSpentTime( m_beginTime );
+
+}
+
+
+void
+WinNtTimer::finish()
+{
+ LONGLONG quadTimeEnd;
+ LONGLONG quadProcessedElapse;
+ m_isValid = m_isValid && GetThreadSpentTime( quadTimeEnd );
+ if ( m_isValid )
+ {
+ quadProcessedElapse = quadTimeEnd - m_beginTime;
+ m_elapsedTime = double(quadProcessedElapse) / 10000000;
+ }
+ else
+ m_elapsedTime = -1;
+}
+
+
+double
+WinNtTimer::elapsedTime() const
+{
+ return m_elapsedTime;
+}
diff --git a/examples/ClockerPlugIn/WinNtTimer.h b/examples/ClockerPlugIn/WinNtTimer.h
new file mode 100644
index 0000000..fa871b9
--- /dev/null
+++ b/examples/ClockerPlugIn/WinNtTimer.h
@@ -0,0 +1,36 @@
+// //////////////////////////////////////////////////////////////////////////
+// Header file WinNtTimer.h for class WinNtTimer
+// (c)Copyright 2000, Baptiste Lepilleur.
+// Created: 2002/04/19
+// //////////////////////////////////////////////////////////////////////////
+#ifndef WINNTTIMER_H
+#define WINNTTIMER_H
+
+#include <windows.h>
+#include <winnt.h>
+#include <winbase.h>
+
+
+/// A Timer.
+class WinNtTimer
+{
+public:
+ void start();
+ void finish();
+
+ double elapsedTime() const;
+
+private:
+ LONGLONG m_beginTime;
+ double m_elapsedTime;
+ bool m_isValid;
+};
+
+
+
+// Inlines methods for Timer:
+// --------------------------
+
+
+
+#endif // WINNTTIMER_H
diff --git a/examples/DumperPlugIn/DumperListener.cpp b/examples/DumperPlugIn/DumperListener.cpp
new file mode 100644
index 0000000..3e6a5cb
--- /dev/null
+++ b/examples/DumperPlugIn/DumperListener.cpp
@@ -0,0 +1,120 @@
+// //////////////////////////////////////////////////////////////////////////
+// Implementation file DumperListener.cpp for class DumperListener
+// (c)Copyright 2000, Baptiste Lepilleur.
+// Created: 2002/04/19
+// //////////////////////////////////////////////////////////////////////////
+#include <cppunit/Test.h>
+#include <iostream>
+#include "DumperListener.h"
+
+DumperListener::DumperListener( bool flatten )
+ : m_flatten( flatten )
+ , m_suiteCount( 0 )
+ , m_testCount( 0 )
+ , m_suiteWithTestCount( 0 )
+{
+}
+
+
+DumperListener::~DumperListener()
+{
+}
+
+
+void
+DumperListener::startTest( CppUnit::Test *test )
+{
+ printPath( test, false );
+ ++m_testCount;
+}
+
+
+void
+DumperListener::endTest( CppUnit::Test *test )
+{
+ m_path.up();
+ if ( !m_suiteHasTest.empty() )
+ {
+ m_suiteHasTest.pop();
+ m_suiteHasTest.push( true );
+ }
+}
+
+
+void
+DumperListener::startSuite( CppUnit::Test *suite )
+{
+ printPath( suite, true );
+ ++m_suiteCount;
+ m_suiteHasTest.push( false );
+}
+
+
+void
+DumperListener::endSuite( CppUnit::Test *suite )
+{
+ m_path.up();
+ if ( m_suiteHasTest.top() )
+ ++m_suiteWithTestCount;
+ m_suiteHasTest.pop();
+}
+
+
+void
+DumperListener::endTestRun( CppUnit::Test *test,
+ CppUnit::TestResult *eventManager )
+{
+ double average = 0;
+ if ( m_suiteWithTestCount > 0 )
+ average = double(m_testCount) / m_suiteWithTestCount;
+
+ std::cout << "Statistics: " << m_testCount << " test cases, "
+ << m_suiteCount << " suites, "
+ << average << " test cases / suite with test cases"
+ << std::endl;
+}
+
+
+void
+DumperListener::printPath( CppUnit::Test *test,
+ bool isSuite )
+{
+ m_path.add( test );
+
+ if ( m_flatten )
+ printFlattenedPath( isSuite );
+ else
+ printIndentedPathChild();
+}
+
+
+void
+DumperListener::printFlattenedPath( bool isSuite )
+{
+ std::string path = m_path.toString();
+ if ( isSuite )
+ path += "/";
+ std::cout << path << std::endl;
+}
+
+
+void
+DumperListener::printIndentedPathChild()
+{
+ std::string indent = makeIndentString( m_path.getTestCount() -1 );
+ std::cout << indent << m_path.getChildTest()->getName() << std::endl;
+}
+
+
+std::string
+DumperListener::makeIndentString( int indentLevel )
+{
+ std::string indent;
+ for ( int parentIndent =0; parentIndent < indentLevel-1; ++parentIndent )
+ indent += "| ";
+
+ if ( indentLevel > 0 )
+ indent += "+--";
+
+ return indent;
+}
diff --git a/examples/DumperPlugIn/DumperListener.h b/examples/DumperPlugIn/DumperListener.h
new file mode 100644
index 0000000..d048929
--- /dev/null
+++ b/examples/DumperPlugIn/DumperListener.h
@@ -0,0 +1,67 @@
+// //////////////////////////////////////////////////////////////////////////
+// Header file DumperListener.h for class DumperListener
+// (c)Copyright 2000, Baptiste Lepilleur.
+// Created: 2002/04/19
+// //////////////////////////////////////////////////////////////////////////
+#ifndef DUMPERLISTENER_H
+#define DUMPERLISTENER_H
+
+#include <cppunit/TestListener.h>
+#include <cppunit/TestPath.h>
+#include <stack>
+
+
+/// TestListener that prints a flatten or hierarchical view of the test tree.
+class DumperListener : public CppUnit::TestListener
+{
+public:
+ DumperListener( bool flatten );
+
+ virtual ~DumperListener();
+
+ void startTest( CppUnit::Test *test );
+
+ void endTest( CppUnit::Test *test );
+
+ void startSuite( CppUnit::Test *suite );
+
+ void endSuite( CppUnit::Test *suite );
+
+ void endTestRun( CppUnit::Test *test,
+ CppUnit::TestResult *eventManager );
+
+private:
+ /// Prevents the use of the copy constructor.
+ DumperListener( const DumperListener &other );
+
+ /// Prevents the use of the copy operator.
+ void operator =( const DumperListener &other );
+
+ void printPath( CppUnit::Test *test,
+ bool isSuite );
+
+ void printFlattenedPath( bool isSuite );
+
+ void printIndentedPathChild();
+
+ std::string makeIndentString( int indentLevel );
+
+private:
+ bool m_flatten;
+ CppUnit::TestPath m_path;
+
+ int m_suiteCount;
+ int m_testCount;
+ int m_suiteWithTestCount;
+
+ std::stack<bool> m_suiteHasTest;
+};
+
+
+
+// Inlines methods for DumperListener:
+// -----------------------------------
+
+
+
+#endif // DUMPERLISTENER_H
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 &parameters )
+ {
+ 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
diff --git a/examples/DumperPlugIn/DumperPlugIn.dsp b/examples/DumperPlugIn/DumperPlugIn.dsp
new file mode 100644
index 0000000..7498bd0
--- /dev/null
+++ b/examples/DumperPlugIn/DumperPlugIn.dsp
@@ -0,0 +1,107 @@
+# Microsoft Developer Studio Project File - Name="DumperPlugIn" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=DumperPlugIn - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "DumperPlugIn.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "DumperPlugIn.mak" CFG="DumperPlugIn - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "DumperPlugIn - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "DumperPlugIn - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "DumperPlugIn - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DUMPERPLUGIN_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DUMPERPLUGIN_EXPORTS" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunit_dll.lib /nologo /dll /machine:I386 /out:"../../lib/DumperPlugIn.dll" /libpath:"../../lib/"
+
+!ELSEIF "$(CFG)" == "DumperPlugIn - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DUMPERPLUGIN_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DUMPERPLUGIN_EXPORTS" /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunitd_dll.lib /nologo /dll /debug /machine:I386 /out:"../../lib/DumperPlugInd.dll" /pdbtype:sept /libpath:"../../lib/"
+
+!ENDIF
+
+# Begin Target
+
+# Name "DumperPlugIn - Win32 Release"
+# Name "DumperPlugIn - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\DumperListener.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\DumperListener.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\DumperPlugIn.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\ClockerPlugIn\Makefile.am
+# End Source File
+# End Target
+# End Project
diff --git a/examples/DumperPlugIn/Makefile.am b/examples/DumperPlugIn/Makefile.am
new file mode 100644
index 0000000..bb1f6d3
--- /dev/null
+++ b/examples/DumperPlugIn/Makefile.am
@@ -0,0 +1,2 @@
+EXTRA_DIST = DumperListener.h DumperListener.cpp DumperPlugIn.cpp \
+ DumperPlugIn.dsp \ No newline at end of file
diff --git a/examples/Makefile.am b/examples/Makefile.am
index f311edd..2dd2145 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = hierarchy cppunittest simple
+SUBDIRS = hierarchy cppunittest simple ClockerPlugIn DumperPlugIn
# No dist subdir for msvc6: is handled by toplevel dist-hook
# DIST_SUBDIRS = msvc6
diff --git a/examples/ReadMe.txt b/examples/ReadMe.txt
new file mode 100644
index 0000000..5359a0f
--- /dev/null
+++ b/examples/ReadMe.txt
@@ -0,0 +1,21 @@
+simple/simple.dsp: A simple CppUnit's example. Basic TextTestRunner and a single 'standard'
+ TestFixture. A good starting point
+
+simple/simple_plugin.dsp: Like 'simple', but creates a test plug-in. The test plug-in can
+ be run with DllPlugInRunner.
+
+hierarchy/: A simple example that demonstrate the use of helper macros with template
+ and how to subclass TestFixture.
+
+cppunittest/: CppUnit's unit tests. Contains CppUnitTestMain which build an application
+ with CppUnit's tests, and which wrap the same unit tests into a test plug-in.
+
+ClockerPlugIn/: a 'TestListener' plug-in. Demonstrates the use of the test plug-in to
+extends DllPlugInRunner. The test plug-in tracks the time each test and suite takes to run.
+
+DumperPlugIn/: a 'TestListener' plug-in that dumps the test hierarchy as a tree or in
+a flattened format (using TestPath).
+
+msvc6/: VC++ specific examples.
+ HostApp/: Like 'simple' but use the MFC TestRunner.
+qt/: QT specific examples.
diff --git a/examples/cppunittest/CppUnitTestMain.cpp b/examples/cppunittest/CppUnitTestMain.cpp
index 68a6a1b..1e00009 100644
--- a/examples/cppunittest/CppUnitTestMain.cpp
+++ b/examples/cppunittest/CppUnitTestMain.cpp
@@ -5,7 +5,7 @@
#include <cppunit/TextTestProgressListener.h>
#include <cppunit/BriefTestProgressListener.h>
#include <cppunit/XmlOutputter.h>
-#include "CppUnitTestSuite.h"
+#include <cppunit/extensions/TestFactoryRegistry.h>
#include <stdexcept>
#include <fstream>
@@ -34,7 +34,7 @@ main( int argc, char* argv[] )
// Add the top suite to the test runner
CppUnit::TestRunner runner;
- runner.addTest( CppUnitTest::suite() );
+ runner.addTest( CppUnit::TestFactoryRegistry::getRegistry().makeTest() );
try
{
std::cout << "Running " << testPath;
diff --git a/examples/cppunittest/CppUnitTestMain.dsp b/examples/cppunittest/CppUnitTestMain.dsp
index e3a6a30..7dc4d52 100644
--- a/examples/cppunittest/CppUnitTestMain.dsp
+++ b/examples/cppunittest/CppUnitTestMain.dsp
@@ -117,7 +117,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../lib/cppunit.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../lib/cppunit_dll.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../../lib/cppunit_dll.lib cppunit_dll.lib /nologo /subsystem:console /machine:I386
# Begin Special Build Tool
TargetPath=.\ReleaseDLL\CppUnitTestMain.exe
SOURCE="$(InputPath)"
diff --git a/examples/cppunittest/CppUnitTestPlugIn.cpp b/examples/cppunittest/CppUnitTestPlugIn.cpp
new file mode 100644
index 0000000..1517b11
--- /dev/null
+++ b/examples/cppunittest/CppUnitTestPlugIn.cpp
@@ -0,0 +1,5 @@
+#include <cppunit/plugin/TestPlugIn.h>
+
+
+// Implements all the plug-in stuffs, WinMain...
+CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/examples/cppunittest/CppUnitTestPlugIn.dsp b/examples/cppunittest/CppUnitTestPlugIn.dsp
new file mode 100644
index 0000000..54eaf5f
--- /dev/null
+++ b/examples/cppunittest/CppUnitTestPlugIn.dsp
@@ -0,0 +1,351 @@
+# Microsoft Developer Studio Project File - Name="CppUnitTestPlugIn" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=CppUnitTestPlugIn - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "CppUnitTestPlugIn.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "CppUnitTestPlugIn.mak" CFG="CppUnitTestPlugIn - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "CppUnitTestPlugIn - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "CppUnitTestPlugIn - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "CppUnitTestPlugIn - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ReleasePlugIn"
+# PROP Intermediate_Dir "ReleasePlugIn"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUNITTESTPLUGIN_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /D "NDEBUG" /D "CPPUNITTESTPLUGIN_EXPORTS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUNIT_DLL" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunit_dll.lib /nologo /dll /machine:I386 /libpath:"../../lib/"
+
+!ELSEIF "$(CFG)" == "CppUnitTestPlugIn - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "DebugPlugIn"
+# PROP Intermediate_Dir "DebugPlugIn"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CPPUNITTESTPLUGIN_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /D "_DEBUG" /D "CPPUNIT_DLL" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunitd_dll.lib /nologo /dll /debug /machine:I386 /out:"DebugPlugIn/CppUnitTestPlugInd.dll" /pdbtype:sept /libpath:"../../lib/"
+
+!ENDIF
+
+# Begin Target
+
+# Name "CppUnitTestPlugIn - Win32 Release"
+# Name "CppUnitTestPlugIn - Win32 Debug"
+# Begin Group "Tests"
+
+# PROP Default_Filter ""
+# Begin Group "Core"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\ExceptionTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\ExceptionTest.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\NotEqualExceptionTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\NotEqualExceptionTest.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestAssertTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestAssertTest.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestCallerTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestCallerTest.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestCaseTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestCaseTest.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestFailureTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestFailureTest.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestPathTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestPathTest.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestResultTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestResultTest.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestSuiteTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestSuiteTest.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestTest.h
+# End Source File
+# End Group
+# Begin Group "UnitTestTools"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\XmlUniformiser.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\XmlUniformiser.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\XmlUniformiserTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\XmlUniformiserTest.h
+# End Source File
+# End Group
+# Begin Group "Helper"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\HelperMacrosTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\HelperMacrosTest.h
+# End Source File
+# End Group
+# Begin Group "Extension"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\OrthodoxTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\OrthodoxTest.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\RepeatedTestTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\RepeatedTestTest.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestDecoratorTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestDecoratorTest.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestSetUpTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestSetUpTest.h
+# End Source File
+# End Group
+# Begin Group "Output"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\TestResultCollectorTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestResultCollectorTest.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\XmlOutputterTest.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\XmlOutputterTest.h
+# End Source File
+# End Group
+# End Group
+# Begin Group "TestSupport"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\BaseTestCase.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\BaseTestCase.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\FailureException.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\MockTestCase.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\MockTestCase.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\MockTestListener.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\MockTestListener.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SubclassedTestCase.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SubclassedTestCase.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SynchronizedTestResult.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TrackedTestCase.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TrackedTestCase.h
+# End Source File
+# End Group
+# Begin Group "Suites"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\CoreSuite.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CppUnitTestSuite.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\ExtensionSuite.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\HelperSuite.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\OutputSuite.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\UnitTestToolSuite.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\CppUnitTestPlugIn.cpp
+# End Source File
+# End Target
+# End Project
diff --git a/examples/cppunittest/CppUnitTestSuite.cpp b/examples/cppunittest/CppUnitTestSuite.cpp
index 01f66cd..563caff 100644
--- a/examples/cppunittest/CppUnitTestSuite.cpp
+++ b/examples/cppunittest/CppUnitTestSuite.cpp
@@ -1,34 +1,17 @@
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include "CppUnitTestSuite.h"
+#include <cppunit/extensions/HelperMacros.h>
#include "CoreSuite.h"
#include "HelperSuite.h"
#include "ExtensionSuite.h"
#include "OutputSuite.h"
#include "UnitTestToolSuite.h"
-
-namespace CppUnitTest
-{
-
-CppUnit::Test *
-suite()
+namespace CppUnitTest
{
- CppUnit::TestFactoryRegistry &registry =
- CppUnit::TestFactoryRegistry::getRegistry();
-
- registry.registerFactory(
- &CppUnit::TestFactoryRegistry::getRegistry( coreSuiteName() ) );
- registry.registerFactory(
- &CppUnit::TestFactoryRegistry::getRegistry( extensionSuiteName() ) );
- registry.registerFactory(
- &CppUnit::TestFactoryRegistry::getRegistry( helperSuiteName() ) );
- registry.registerFactory(
- &CppUnit::TestFactoryRegistry::getRegistry( outputSuiteName() ) );
- registry.registerFactory(
- &CppUnit::TestFactoryRegistry::getRegistry( unitTestToolSuiteName() ) );
-
- return registry.makeTest();
-}
+CPPUNIT_REGISTRY_ADD_TO_DEFAULT( coreSuiteName() );
+CPPUNIT_REGISTRY_ADD_TO_DEFAULT( extensionSuiteName() );
+CPPUNIT_REGISTRY_ADD_TO_DEFAULT( helperSuiteName() );
+CPPUNIT_REGISTRY_ADD_TO_DEFAULT( outputSuiteName() );
+CPPUNIT_REGISTRY_ADD_TO_DEFAULT( unitTestToolSuiteName() );
-} // namespace CppUnitTest
+} \ No newline at end of file
diff --git a/examples/cppunittest/Makefile.am b/examples/cppunittest/Makefile.am
index bae0a8c..d867378 100644
--- a/examples/cppunittest/Makefile.am
+++ b/examples/cppunittest/Makefile.am
@@ -67,3 +67,7 @@ cppunittestmain_SOURCES = \
cppunittestmain_LDADD= \
$(top_builddir)/src/cppunit/libcppunit.la
+
+cppunittestmain_LDFLAGS = -ldl
+
+
diff --git a/examples/examples.dsw b/examples/examples.dsw
index 46a1fac..038cec6 100644
--- a/examples/examples.dsw
+++ b/examples/examples.dsw
@@ -3,6 +3,21 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
###############################################################################
+Project: "ClockerPlugIn"=.\ClockerPlugIn\ClockerPlugIn.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name cppunit_dll
+ End Project Dependency
+}}}
+
+###############################################################################
+
Project: "CppUnitTestApp"=.\msvc6\CppUnitTestApp\CppUnitTestApp.dsp - Package Owner=<4>
Package=<5>
@@ -36,6 +51,21 @@ Package=<4>
###############################################################################
+Project: "CppUnitTestPlugIn"=.\cppunittest\CppUnitTestPlugIn.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name cppunit_dll
+ End Project Dependency
+}}}
+
+###############################################################################
+
Project: "DllPlugInTester"=..\src\DllPlugInTester\DllPlugInTester.dsp - Package Owner=<4>
Package=<5>
@@ -51,6 +81,21 @@ Package=<4>
###############################################################################
+Project: "DumperPlugIn"=.\DumperPlugIn\DumperPlugIn.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name cppunit_dll
+ End Project Dependency
+}}}
+
+###############################################################################
+
Project: "HostApp"=.\msvc6\HostApp\HostApp.dsp - Package Owner=<4>
Package=<5>
diff --git a/examples/examples.opt b/examples/examples.opt
index e7275a2..8b647af 100644
--- a/examples/examples.opt
+++ b/examples/examples.opt
Binary files differ
diff --git a/examples/msvc6/CppUnitTestApp/CppUnitTestApp.clw b/examples/msvc6/CppUnitTestApp/CppUnitTestApp.clw
deleted file mode 100644
index 6a47c0a..0000000
--- a/examples/msvc6/CppUnitTestApp/CppUnitTestApp.clw
+++ /dev/null
@@ -1,74 +0,0 @@
-; CLW file contains information for the MFC ClassWizard
-
-[General Info]
-Version=1
-LastClass=CppUnitTestAppDlg
-LastTemplate=CDialog
-NewFileInclude1=#include "stdafx.h"
-NewFileInclude2=#include "CppUnitTestApp.h"
-
-ClassCount=4
-Class1=CppUnitTestApp
-Class2=CppUnitTestAppDlg
-Class3=CAboutDlg
-
-ResourceCount=5
-Resource1=IDD_ABOUTBOX
-Resource2=IDR_MAINFRAME
-Resource3=IDD_CPPUNITTESTAPP_DIALOG
-Resource4=IDD_CPPUNITTESTAPP_DIALOG (English (U.S.))
-Resource5=IDD_ABOUTBOX (English (U.S.))
-
-[CLS:CppUnitTestApp]
-Type=0
-HeaderFile=CppUnitTestApp.h
-ImplementationFile=CppUnitTestApp.cpp
-Filter=N
-
-[CLS:CppUnitTestAppDlg]
-Type=0
-HeaderFile=CppUnitTestAppDlg.h
-ImplementationFile=CppUnitTestAppDlg.cpp
-Filter=D
-
-[CLS:CAboutDlg]
-Type=0
-HeaderFile=CppUnitTestAppDlg.h
-ImplementationFile=CppUnitTestAppDlg.cpp
-Filter=D
-
-[DLG:IDD_ABOUTBOX]
-Type=1
-ControlCount=4
-Control1=IDC_STATIC,static,1342177283
-Control2=IDC_STATIC,static,1342308352
-Control3=IDC_STATIC,static,1342308352
-Control4=IDOK,button,1342373889
-Class=CAboutDlg
-
-
-[DLG:IDD_CPPUNITTESTAPP_DIALOG]
-Type=1
-ControlCount=3
-Control1=IDOK,button,1342242817
-Control2=IDCANCEL,button,1342242816
-Control3=IDC_STATIC,static,1342308352
-Class=CppUnitTestAppDlg
-
-[DLG:IDD_CPPUNITTESTAPP_DIALOG (English (U.S.))]
-Type=1
-Class=?
-ControlCount=3
-Control1=IDOK,button,1342242817
-Control2=IDCANCEL,button,1342242816
-Control3=IDC_STATIC,static,1342308352
-
-[DLG:IDD_ABOUTBOX (English (U.S.))]
-Type=1
-Class=?
-ControlCount=4
-Control1=IDC_STATIC,static,1342177283
-Control2=IDC_STATIC,static,1342308480
-Control3=IDC_STATIC,static,1342308352
-Control4=IDOK,button,1342373889
-
diff --git a/examples/msvc6/CppUnitTestApp/CppUnitTestApp.cpp b/examples/msvc6/CppUnitTestApp/CppUnitTestApp.cpp
index d1d5f3c..242e3d6 100644
--- a/examples/msvc6/CppUnitTestApp/CppUnitTestApp.cpp
+++ b/examples/msvc6/CppUnitTestApp/CppUnitTestApp.cpp
@@ -6,7 +6,6 @@
#include "CppUnitTestAppDlg.h"
#include <cppunit/ui/mfc/TestRunner.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunittest/CppUnitTestSuite.h>
#ifdef _DEBUG
#define new DEBUG_NEW
@@ -72,7 +71,7 @@ CppUnitTestApp::RunTests()
{
CppUnit::MfcUi::TestRunner runner;
- runner.addTest( CppUnitTest::suite() );
+ runner.addTest( CppUnit::TestFactoryRegistry::getRegistry().makeTest() );
runner.run();
}
diff --git a/examples/simple/ExampleTestCase.h b/examples/simple/ExampleTestCase.h
index 7c993ee..b5d89e9 100644
--- a/examples/simple/ExampleTestCase.h
+++ b/examples/simple/ExampleTestCase.h
@@ -39,4 +39,5 @@ protected:
};
-#endif \ No newline at end of file
+#endif
+ \ No newline at end of file
diff --git a/examples/simple/Makefile.am b/examples/simple/Makefile.am
index 47e7d68..f9200de 100644
--- a/examples/simple/Makefile.am
+++ b/examples/simple/Makefile.am
@@ -9,3 +9,4 @@ simple_SOURCES= ExampleTestCase.cpp Main.cpp ExampleTestCase.h
simple_LDADD= \
$(top_builddir)/src/cppunit/libcppunit.la
+simple_LDFLAGS = -ldl \ No newline at end of file
diff --git a/examples/simple/simple.dsp b/examples/simple/simple.dsp
index 2c90c37..2b80bd9 100644
--- a/examples/simple/simple.dsp
+++ b/examples/simple/simple.dsp
@@ -50,7 +50,7 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunit.lib /nologo /subsystem:console /machine:I386 /libpath:"../../lib/"
!ELSEIF "$(CFG)" == "simple - Win32 Debug"
@@ -66,8 +66,8 @@ LINK32=link.exe
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x40c /d "_DEBUG"
# ADD RSC /l 0x40c /d "_DEBUG"
@@ -75,7 +75,7 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cppunitd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../lib/"
!ENDIF
@@ -96,5 +96,9 @@ SOURCE=.\ExampleTestCase.h
SOURCE=.\Main.cpp
# End Source File
+# Begin Source File
+
+SOURCE=.\Makefile.am
+# End Source File
# End Target
# End Project
diff --git a/examples/simple/simple_plugin.dsp b/examples/simple/simple_plugin.dsp
index 70d79da..711844b 100644
--- a/examples/simple/simple_plugin.dsp
+++ b/examples/simple/simple_plugin.dsp
@@ -75,8 +75,8 @@ PostBuild_Cmds=..\..\lib\DllPlugInTester_dll.exe $(TargetPath)
# PROP Intermediate_Dir "DebugPlugIn"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SIMPLE_PLUGIN_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SIMPLE_PLUGIN_EXPORTS" /D "CPPUNIT_DLL" /FD /GZ /c
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SIMPLE_PLUGIN_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SIMPLE_PLUGIN_EXPORTS" /D "CPPUNIT_DLL" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
@@ -92,7 +92,7 @@ LINK32=link.exe
TargetPath=.\DebugPlugIn\simple_plugind.dll
SOURCE="$(InputPath)"
PostBuild_Desc=Running tests...
-PostBuild_Cmds=..\..\lib\DllPlugInTesterd_dll.exe $(TargetPath)
+PostBuild_Cmds=..\..\lib\DllPlugInTesterd_dll.exe -b --xml tests.xml -c $(TargetPath)
# End Special Build Tool
!ENDIF
diff --git a/examples/simple/simple_plugin.opt b/examples/simple/simple_plugin.opt
new file mode 100644
index 0000000..40b55e5
--- /dev/null
+++ b/examples/simple/simple_plugin.opt
Binary files differ