summaryrefslogtreecommitdiff
path: root/examples/cppunittest/CppUnitTestMain.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Include/cppunit/Portability.Baptiste Lepilleur2004-06-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | include/cppunit/Portability.h: moved OStringStream alias definition to Portability/Stream.h. User need to define EVC4 to indicate that config-evc4.h should be used. (how to we detect this automatically ?). Notes that this means it might be needed to add #include <string> to some headers since its no longer included by Portability.h. * include/cppunit/Portability/Stream.h: define alias OStringStream, stdCOut(), and OFileStream. If CPPUNIT_NO_STREAM is defined (evc4 config), then provides our own implementation (based on sprintf and fwrite). * include/cppunit/config/config-evc4.h: config file for embedded visual c++ 4. Still need to detect for this platform in Portability.h (currently relying on EVC4 being defined...) * *.[cpp/h]: most source files have been impacted with the following change: #include <iostream> -> #include <cppunit/Portability/Stream.h> std::ostream -> CPPUNIT_NS::OStream std::ofstream -> CPPUNIT_NS::OFileStream std::cout -> CPPUNIT_NS::stdCOut() std::endl -> "\n" Also, code using std::cin as been defined out if CPPUNIT_NO_STREAM was defined. The exact list of impact files can be obtain in CVS using tags: TG_CPPUNIT_NO_STREAM_BEFORE & TG_CPPUNIT_NO_STREAM_AFTER.
* include/cppunit/extensions/TestSuiteBuilder.h: removed (unused)Baptiste Lepilleur2003-04-061-5/+6
|
* Src/examples/cppunittest/TrackedTestCase.Baptiste Lepilleur2003-03-111-1/+1
| | | | | | | src/examples/cppunittest/TrackedTestCase.cpp: * src/examples/cppunittest/CppUnitTestMain.cpp: * src/examples/money/Money.h: partially applied patch #699794. Fixed compilation issues with Borland C++ 6.
* Include/cppunit/ui/text/TestRunner.Baptiste Lepilleur2002-07-131-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | include/cppunit/ui/text/TestRunner.h: * src/cppunit/TextTestRunner.cpp: Renamed TextUi::TestRunner TextTestRunner and moved it to the CppUnit namespace. Added a deprecated typedef for compatibility with previous version. * include/cppunit/ui/text/TextTestRunner.h: added. * include/cppunit/ui/mfc/TestRunner.h: * src/cppunit/msvc6/testrunner/TestRunner.cpp: Renamed MfcUi::TestRunner MfcTestRunner. Added deprecated typedef for compatibility. Renamed TestRunner.cpp to MfcTestRunner.cpp. * include/cppunit/ui/mfc/MfcTestRunner.h: added. * include/cppunit/ui/qt/TestRunner.h: * src/qttestrunner/TestRunner.cpp: renamed QtUi::TestRunner QtTestRunner and moved it to CppUnit namespace. Added a deprecated typedef for compatibility. Renamed TestRunner.cpp to QtTestRunner.cpp. * include/cppunit/ui/qt/TestRunner.h: * src/qttestrunner/TestRunner.h: Moved TestRunner to CppUnit namespace and renamed it QtTestRunner. Added deprecated typedef for compatibility. * include/cppunit/Asserter.h: * src/cppunit/Asserter.cpp: changed namespace Asserter to a struct and made all methods static. * include/cppunit/extensions/HelperMacros.h: * include/cppunit/extensions/SourceLine.h: * include/cppunit/extensions/TestAssert.h: * include/cppunit/extensions/TestPlugIn.h: * include/cppunit/Portability.h: changed CPPUNIT_NS(symbol) to a symbol macro that expand either to CppUnit or nothing. The symbol is no longer a parameter. * include/cppunit/portability/CppUnitVector.h: * include/cppunit/portability/CppUnitDeque.h: * include/cppunit/portability/CppUnitMap.h: added. STL Wrapper for compilers that do not support template default argumenent and need the allocator to be passed when instantiating STL container. * examples/cppunittest/*.h: * examples/cppunittest/*.cpp: * src/msvc6/testrunner/*.h: * src/msvc6/testrunner/*.cpp: * src/msvc6/testpluginrunner/*.h: * src/msvc6/testpluginrunner/*.cpp: * src/qttestrunner/*.h: * src/qttestrunner/*.cpp: replaced occurence of CppUnit:: by CPPUNIT_NS. * src/cppunit/TestSuite.h: replaced occurence of std::vector by CppUnitVector.
* THANKS: updated Baptiste Lepilleur2002-04-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Bumped version to 1.Baptiste Lepilleur2002-04-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bumped version to 1.9.3 * FAQ: added question about 4786 warning on VC++. * NEWS: updated. * contrib/msvc/readme.txt: moved to contrib/readme.txt. * contrib/xml-xsl/report.xsl: added XML style sheet contributed by 'cuppa' project team (http://sourceforge.jp/projects/cuppa/) * examples/cppunittest/TestResultTest.h: * examples/cppunittest/TestResultTest.cpp: added tests for startTestRun()/endTestRun(). * examples/simple/*: added. A simple example. * include/cppunit/BriefTestProgressListener.h: * src/cppunit/BriefTestProgressListener.cpp: added. Verbose progess listener that print the test name before running the test. * include/cppunit/TestListener.h: added startTestRun()/endTestRun(). * include/cppunit/TestResult.h: * src/cppunit/TestResult.cpp: added runTest(), to be called to run a test by test runner. * src/cppunit/TextTestRunner.cpp: * src/cppunit/TestRunner.cpp: updated to use TestResult::runTest(). * include/cppunit/plugin/PlugInManager.h: * src/cppunit/PlugInManager.cpp: added. Managers for all loaded plug-ins. * include/cppunit/plugin/TestPlugInDefaultImpl.h: * src/cppunit/TestPlugInDefaultImpl.cpp: renamed TestPlugInAdapter. All implementations are empty. * include/cppunit/plugin/TestPlugInSuite.h: removed. * src/cppunit/TestPlugInSuite.cpp: removed. Replaced by PlugInManager. * include/cppunit/plugin/TestPlugIn.h: rewrote the plug-in interface to provide more versatility. updated macros to match new interface. * include/cppunit/extensions/TestFactoryRegistry.h: * include/cppunit/extensions/TestFactoryRegistry.cpp: Added unregisterFactory(). Added convenience method addRegistry(). Rewrote registry life cycle management. AutoRegisterSuite can now detect that the registry has been destroy and not call to it to unregister its test factory. * include/cppunit/extensions/AutoRegisterTest.h: on destruction, the registered factory is unregistered from the registry. * include/cppunit/extensions/HelperMacros.h: added macros CPPUNIT_REGISTRY_ADD_TO_DEFAULT and CPPUNIT_REGISTRY_ADD to help build test suite hierarchy. * src/cppunit/msvc/DllPlugInTester/*: moved to src/cppunit/DllPlugInTester/. * src/cppunit/DllPlugInTester/DllPlugInTester.cpp: removed UNICODE stuffs. Use the PlugInManager instead of PlugInTestSuite. Simplified: only one test on command line, but many DLL can be specified. Added configurations to link against cppunit dll, those are now the default configuration (static linking don't make much sense for plug-in).
* Include/cppunit/XmlOutputter.Baptiste Lepilleur2002-04-131-1/+9
| | | | | | | | | | include/cppunit/XmlOutputter.h: * src/cppunit/XmlOutputter.cpp: Made XML output more human readable. Idented element. * examples/cppunittest/XmlUniformiser.h: * examples/cppunittest/XmlUniformiser.cpp: * examples/cppunittest/XmlUniformiserTest.cpp: modified to ignore trailing space at the end of element content.
* NEWS: updated Baptiste Lepilleur2002-04-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NEWS: updated * doc/other_documentation.dox: addded new module for test plug-in. * include/msvc6/DSPlugin/TestRunnerDSPlugin.h: * include/msvc6/DSPlugin/TestRunnerDSPlugin_i.c: added. Those file are generated by project src/msvc/DSPlugin. They are provided to allow compilation of TestRunner without compiling DSPlugIn which does not build on VC++ 7. * examples/examples.dsw: removed DSPlugIn for workspace (fail to build with VC++ 7). Added DllPlugInTester.dsp to workspace. * examples/msvc6/TestPlugIn/TestPlugIn.dsp: added post-build unit testing using the new DllPlugInTester. * examples/msvc6/EasyTestPlugIn/*: a new project that demonstrates the use of CPPUNIT_TESTPLUGIN_IMPL to create a test plug-in. * src/cppunit/cppunit.dsw: * src/TestPlugInRunner.dsw: * src/TestRunner.dsw: removed. Should use src/CppUnitLibraries.dsw instead. * include/cppunit/ui/text/TestRunner.h: * src/cppunit/TextTestRunner.cpp: removed findTestName() method. Replaced by Test::findTest(). * src/msvc6/DSPlugIn/DSPlugIn.dsp: * src/msvc6/DSPlugIn/DSAddIn.h: changed include for add-in. MIDL generates files in sub-directory ToAddToDistribution. Generated file should be copied to include/msvc6/DSPlugin when modified. This remove the dependecy of MfcTestRunner on DSPlugIn. * src/msvc6/testrunner/ListCtrlFormatter.h: * src/msvc6/testrunner/ListCtrlFormatter.cpp: added GetNextColumnIndex(). * src/msvc6/testrunner/src/TestRunnerDlg.h: * src/msvc6/testrunner/src/TestRunnerDlg.cpp: set column number in MsDevCallerListCtrl when initializing the list. * src/msvc6/testrunner/src/MsDevCallerListCtrl.h: * src/msvc6/testrunner/src/MsDevCallerListCtrl.cpp: column indexes for file and line number are no longer static. Added methods to set those indexes. Changed DSPlugIn header name. * include/msvc6/testrunner/TestPlugInInterface.h: fixed inclusion of windows header for WINAPI. Added macro CPPUNIT_TESTPLUGIN_IMPL to automatically implements a test plug-in. * src/msvc6/DllPlugInTester/*: added new project. A application to test DLL and report using CompilerOutputter. Target for post-build testing and debugging of DLL.
* Makefile.Baptiste Lepilleur2002-04-121-21/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makefile.am: added examples/qt to tar ball release. * TODO: heavily updated. * contrib/msvc/CppUnit*.wwtpl: changed base class for unit test to TestFixture. * include/cppunit/Test.h: removed toString() method. Not used by the framework and source of confusions with getName(). Added getChildTestCount() and getChildTestAt(), introducing the composite pattern at top level. Added utility methods findTest() and findTestPath(). * src/cppunit/Test.cpp: added. Implementation of new utility methods. * include/cppunit/TestCase.h: * src/cppunit/TestCase.cpp: inherits TestLeaf. Removed toString(), run(void) and defaultResult(). Removed default constructor. * src/cppunit/TestCase.cpp: * src/cppunit/TestSuite.cpp: fixed some includes that used "" instead of <>. * include/cppunit/TestComposite.h: * src/cppunit/TestComposite.cpp: added. Common implementation of Test for composite tests (TestSuite). * include/cppunit/TestFailure.h: * src/cppunit/TestFailure.cpp: removed toString(). * include/cppunit/TestLeaf.h: * src/cppunit/TestLeaf.cpp: added. Common implementation of Test for single test (TestCase). * include/cppunit/TestListener.h: added TimingListener example to documentation. * include/cppunit/TestPath.h: * src/cppunit/TestPath.cpp: added. List of test traversed to access a test in the test hierarchy. * include/cppunit/TestRunner.h: added. Generic TestRunner. * src/cppunit/TestRunner.cpp: moved to TextTestRunner.cpp. Added new implementation of includecppunit/TestRunner.h. * include/cppunit/TestSuite.h: * src/cppunit/TestSuite.cpp: inherits TestComposite and implements new Test interface. Removed toString(). * src/cppunit/TextTestRunner.cpp: moved from TestRunner.cpp. Implementation of include/cppunit/ui/text/TestRunner.h. * include/cppunit/extensions/RepeatedTest.h: * src/cppunit/RepeatedTest.cpp: removed toString(). * include/cppunit/extensions/TestDecorator.h: inherits TestLeaf. Removed toString() * include/cppunit/XmlOutputter.h: * src/cppunit/XmlOutputter.cpp: * examples/cppunittest/XmlOutputterTest.cpp: * examples/cppunittest/XmlOutputterTest.h: XML outputter now escape node content. Add unit test for that bug (#540944). Added style sheet support. Modified XML structure: failure message as its own element. * src/msvc/testrunner/TestRunnerModel.h: * src/msvc/testrunner/TestRunnerModel.cpp: used Test::findTest() to find a test by name instead of using RTTI. Added toAnsiString() for convertion when compiling as UNICODE. * src/msvc/testrunner/TreeHierarchyDlg.h: * src/msvc/testrunner/TreeHierarchyDlg.cpp: used new composite interface of Test to explorer the test hierarchy instead of RTTI. * examples/cppunittest/TestPathTest.h: * examples/cppunittest/TestPathTest.cpp: added, unit tests for TestPath. * examples/cppunittest/TestCaseTest.h: * examples/cppunittest/TestCaseTest.cpp: added test for TestLeaf. * examples/cppunittest/TestSuiteTest.h: * examples/cppunittest/TestSuiteTest.cpp: added test for TestComposite and new Test interface.
* Include/cppunitui/: moved to include/cppunit/ui (fix unix install problem).Baptiste Lepilleur2002-04-101-1/+1
| | | | | | | | | | | | | | | | | | | include/cppunitui/: moved to include/cppunit/ui (fix unix install problem). * doc/cookbook.dox: * examples/cppunittest/CppUnitTestMain.cpp: * examples/msvc/CppUnitTestApp/HostApp.cpp: * examples/msvc/HostApp/HostApp.cpp: * examples/qt/Main.Cpp: * examples/src/cppunit/TestRunner.cpp: * examples/src/msvc6/TestRunner/TestRunner.cpp: * examples/src/qttestrunner/TestRunner.cpp: updated to use <cppunit/ui/...> instead of <cppunitui/...> in include directives. * doc/CppUnit-win.dox: generated documentation give the include path at the bottom of the page for each class. * NEWS: added compatibility break for 1.7.10 users.
* examples/cppunittest/CppUnitTestMain.cpp: never wait for a key press.Baptiste Lepilleur2002-04-051-2/+2
|
* Doc/cookbook.Baptiste Lepilleur2002-03-281-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | doc/cookbook.html: removed. Replaced by cookbook.doc. * doc/cookbook.dox: added, conversion of cookbook.html to Doxygen format. * doc/other_documentation.dox: added groups definition. * doc/Makefile.am: replaced cookbook.html by cookbook.dox * doc/Doxyfile.in: added predefined CPPUNIT_HAVE_CPP_SOURCE_ANNOTATION. Replaced cookbook.html by cookbook.dox. * include/cppunitui/mfc/TestRunner.h: added, extracted from include/msvc6/testrunner/TestRunner.h. Moved class TestRunner to namespace CppUnit::MfcUi. * include/msvc6/testrunner/TestRunner.h: deprecated. A simple typedef to CppUnit::MfcUi::TestRunner. * include/textui/TestRuner.h: added, extracted from include/cppunit/TextTestRunner.h. * src/cppunit/TextTestRunner.cpp: renamed TestRunner.cpp. Moved into namespace CppUnit::TextUi. * src/msvc6/testruner/TestRunner.cpp: moved into namespace CppUnit::MfcUi. * src/cppunit/CompilerOutputter.cpp: removed printing "- " before NotEqualException addional message, for consistency between different TestRunner (Mfc,Text...) * include/cppunit/Asserter.h: * include/cppunit/CompilerOutputter.h: * include/cppunit/Exception.h: * include/cppunit/NotEqualException.h: * include/cppunit/Outputter.h: * include/cppunit/SourceLine.h: * include/cppunit/TestAssert.h: * include/cppunit/TestCaller.h: * include/cppunit/TestFailure.h: * include/cppunit/TestFixture.h: * include/cppunit/TestListener.h: * include/cppunit/TestResult.h: * include/cppunit/TestResultCollector.h: * include/cppunit/TestSucessListener.h: * include/cppunit/TestSuite.h: * include/cppunit/TextTestProgressListener.h: * include/cppunit/TextTestRunner.h: * include/cppunit/XmlOutputter.h: * include/cppunit/extensions/AutoRegisterSuite.h: * include/cppunit/extensions/HelperMacros.h: * include/cppunit/extensions/TestFactoryRegistry.h: * include/cppunit/extensions/TestSuiteBuilder.h: * include/cppunit/extensions/TestSuiteFactory.h: doc update. organization in groups. * examples/msvc6/CppUnitTestApp/CppUnitTestApp.cpp: * examples/msvc6/HostApp/HostApp.cpp: updated to use CppUnit::MfcUi::TestRunner. * examples/cppunittest/CppUnitTestMain.cpp: updated to use CppUnit::TextUi::TestRunner.
* NEW: updated and restructured.Baptiste Lepilleur2002-02-281-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NEW: updated and restructured. * include/cppunit/CompilerOutputter.h: * src/cppunit/CompilerOutputter.cpp: updated against TestResultChange. Changed TestResult to TestResultCollector. * include/cppunit/extensions/HelperMacros.h: minor documentation fix. * include/cppunit/Outputter.h: added. Abstract base class for all Outputter. * include/cppunit/Portability.h: made the fix on OStringStream suggested by Bob Summerwill to remove level 4 warning with VC++. * include/cppunit/TestAssert.h: added macro CPPUNIT_ASSERT_EQUAL_MESSAGE. * src/cppunit/TestFailure.cpp: * include/cppunit/TestFailure.h: added method clone() to duplicate a failure. Made all method virtual. * include/cppunit/TestListener.h: changed signature of addFailure() to addFailure( const TestFailure &failure ). Failure is now only a temporary object. * include/cppunit/Outputter.h: added. Abstract base class for all outputter. Used by TextTestRunner. * include/cppunit/SynchronizedObject.h: * src/cppunit/SynchronizedObject.cpp: added. Class extracted from TestResult. Base class for objects that can be accessed from different threads. * include/cppunit/TestResult.h: TestFailure.h is no longer included. * include/cppunit/TestResult.h: * src/cppunit/TestResult.cpp: extracted all methods related to keeping track of the result to the new TestResultCollector class which is a TestListener. * include/cppunit/TestResultCollector.h: * src/cppunit/TestResultCollector.cpp: added. TestListener which kept track of the result of the test run. All failure/error, and tests are tracked. * include/cppunit/TestSucessListener.h: * src/cppunit/TestSucessListener.cpp: added. TestListener extracted from TestResult. Is responsible for wasSucessful(). * include/cppunit/TestCase.h: * src/cppunit/TestCase.cpp: reindented. * include/cppunit/TextOutputter.h: * src/cppunit/TextOutputter.cpp: added. Copied from the deprecated TextTestResult and modified to act as an Ouputter. * include/cppunit/TextTestProgressListener.h: * src/cppunit/TextTestProgressListener.cpp: Copied from the deprecated TextTestResult and modified to print the dot while the test are running. * include/cppunit/TextTestResult.h: * src/cppunit/TextTestResult.cpp: updated against TestResult change. No compatiblity break. Deprecated. * include/cppunit/TextTestRunner.h: * src/cppunit/TextTestRunner.cpp: updated to work with the new TestResult. Use TextTestProgressListener and TextOutputter instead of TextTestResult. Any outputter with interface Outputter can be used to print the test result (CompilerOutputter, XmlOutputter, TextOutputter...) * include/cppunit/XmlOutputter.h: * src/cppunit/XmlOutputter.cpp: updated against TestResultChange. Changed TestResult to TestResultCollector. * src/msvc6/TestRunnerDlg.h: * src/msvc6/TestRunnerDlg.cpp: fixed the 'fullrowselect' feature of the list view. The dialog is a TestListener itself, it no longer use the GUITestResult class. * src/msvc6/TestRunner.rc: moved the "autorun test button" in such a way that it did not overlap the progress bar anymore. * src/msvc6/MfcSynchronizationObject.h: added. Generic SynchronizedObject lock for MFC. * src/msvc6/GUITestResult.h : * src/msvc6/GUITestResult.cpp : removed. * src/qttestrunner/TestRunnerModel.h: * src/qttestrunner/TestRunnerModel.cpp: changed addFailure() signature to reflect change on TestListener. * examples/cppunittest/CppUnitTestMain.cpp: updated to use the new Outputter abstraction and TextTestRunner facilities. * examples/cppunittest/FailingTestCase.h: * examples/cppunittest/FailingTestCase.cpp: removed. Replaced by MockTestCase. * examples/cppunittest/FailingTestCase.h: * examples/cppunittest/FailingTestCase.h: * examples/cppunittest/HelperMacrosTest.h: * examples/cppunittest/HelperMacrosTest.cpp: Updated against TestResult change. Use MockTestListener instead of TestResult to check for sucess or failure. * examples/cppunittest/MockTestListener.h: * examples/cppunittest/MockTestListener.cpp: the class now behave like a mock object. * examples/cppunittest/MockTestCase.h: * examples/cppunittest/MockTestCase.cpp: added. Mock TestCase object. * examples/cppunittest/OrthodoxTest.h: * examples/cppunittest/OrthodoxTest.cpp: Updated against TestResult change. Use MockTestListener instead of TestResult to check for sucess or failure. * examples/cppunittest/SynchronizedTestResult.h: Updated against TestResult change. * examples/cppunittest/TestCallerTest.h: * examples/cppunittest/TestCallerTest.cpp: Updated against TestResult change. Use MockTestListener instead of TestResult. * examples/cppunittest/TestCaseTest.h: * examples/cppunittest/TestCaseTest.cpp: Updated against TestResult change. Use MockTestListener and MockTestCase instead of FailingTestCase and TestResult. * examples/cppunittest/TestDecoratorTest.h: * examples/cppunittest/TestDecoratorTest.cpp: Updated against TestResult change. Use MockTestCase instead of FailingTestCase. * examples/cppunittest/TestListenerTest.h: * examples/cppunittest/TestListenerTest.cpp: removed. Those unit tests have been rewrote and moved to TestResultTest. * examples/cppunittest/TestResultTest.h: * examples/cppunittest/TestResultTest.cpp: Updated to test the new interface. Tests from TestListenerTest have been moved here. * examples/cppunittest/TestResultCollectorTest.h: * examples/cppunittest/TestResultCollectorTest.cpp: added. Tests for the class that been extracted from TestResult. * examples/cppunittest/TestSetUpTest.h: * examples/cppunittest/TestSetUpTest.cpp: renamed SetUp inner class to MockSetUp. Changed interface to be more akin to a Mock object. * examples/cppunittest/TestSuiteTest.h: * examples/cppunittest/TestSuiteTest.cpp: Updated against TestResult change, and rewrote to use MockTestCase instead of FailingTestCase. * examples/cppunittest/XmlOutputterTest.h: * examples/cppunittest/XmlOutputterTest.cpp: Updated against TestResult change. Added some utility methods to make the update easier.
* Include/cppunit/CompilerTestResultOutputter.Baptiste Lepilleur2001-10-071-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | include/cppunit/CompilerTestResultOutputter.h : renamed CompilerOutputter.h * src/cppunit/CompilerTestResultOutputter.cpp : renamed CompilerOutputter.cpp * include/cppunit/CompilerTestResultOutputter.h : * src/cppunit/CompilerTestResultOutputter.cpp : ajust max line length for wrapping. Added static factory method defaultOutputter(). Print the number of test runs on success. * include/cppunit/CompilerTestResultOutputter.h : renamed CompilerOutputter.h. * src/cppunit/CompilerTestResultOutputter.cpp : renamed CompilerOutputter.cpp. * examples/cppunittest/CppUnitTestMain.cpp : use factory method CompilerTestResultOutputter::defaultOutputter(). * src/msvc6/DSPlugIn/DSPlugIn.dsp : removed COM registration in post-build step. IT is automatically done by VC++ when the add-in is added. Caused build to failed if the add-in was used in VC++. * NEWS : updated. * src/cppunit/TestAssert.cpp : modified deprecated assert implementations to use Asserter. * examples/cppunittest/XmlTestResultOutputterTest.h : renamed XmlOutputterTest.h. * examples/cppunittest/XmlTestResultOutputterTest.cpp : renamed XmlOutputterTest.cpp. * NEWS : * examples/cppunittest/CppUnitTestMain.cpp : * examples/cppunittest/CppUnitTestMain.dsp : * examples/cppunittest/Makefile.am : * examples/cppunittest/XmlTestResultOutputterTest.h : * examples/cppunittest/XmlTestResultOutputterTest.cpp : * examples/msvc6/CppUniTestApp/CppUnitTestApp.dsp * include/cppunit/CompilerOutputter.h : * include/cppunit/Makefile.am : * include/cppunit/XmlTestResultOutputter.h : * src/cppunit/CompilerOutputter.cpp : * src/cppunit/cppunit.dsp : * src/cppunit/Makefile.am : * src/cppunit/XmlTestResultOutputter.cpp : change due to renaming CompilerTestResultOutputter to CompilerOutputter, XmlTestResultOutputter to XmlOuputter, XmlTestResultOutputterTest to XmlOutputterTest.
* Include/cppunit/CompilerTestResultOutputter.Baptiste Lepilleur2001-10-061-2/+14
| | | | | | | | | | | | | | | | | | | | | | | include/cppunit/CompilerTestResultOutputter.h : * src/cppunit/CompilerTestResultOutputter.cpp : added. Output result in a compiler compatible format. * src/cppunit/CppUnit.dsp : * include/cppunit/MakeFile.am : * src/cppunit/MakeFile.am : added CompilerTestResultOutputter.cpp and CompilerTestResultOutputter.h. * examples/cppunittest/CppUnitTestMain.cpp : if -selftest is specified on the command line, no standard test result are printed, but compiler compatible result at printed. * examples/cppunittest/CppUnitTestMain.dsp : added post-build step to run the test suite with -selftest. * NEWS : updated. * src/cppunit/TextTestRunner.cpp : skip a line after printing progress.
* Examples/cppunittest/CppUnitTestMain.Baptiste Lepilleur2001-10-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | examples/cppunittest/CppUnitTestMain.cpp : application returns 0 is test suite run sucessfuly, 1 otherwise. * src/cppunit/Exception.cpp : bug fix, operator =() with VC++. Removed call to std::exception::operator =() which is bugged on VC++. * doc/FAQ : added a note explaining why the test ExceptionTest.testAssignment used to fail. * NEWS : updated and detailed. * include/cppunit/TestResult.h : * src/cppunit/TestResult.cpp : added reset(). * include/cppunit/TextTestRunner.h : * src/cppunit/TextTestRunner.cpp : Constructor take an optional TextTestRestult. The TextTestResult remain alive as long as the runner. Added result() to retreive the result. Printing the result is now optinal (enabled by default).
* Include/cppunit/extensions/TestFactoryRegistry.Baptiste Lepilleur2001-10-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | include/cppunit/extensions/TestFactoryRegistry.h * src/cppunit/TestFactoryRegistry.cpp : fixed memory leaks that occured when a TestFactoryRegistry was registered into another TestFactoryRegistry. * include/cppunit/extensions/AutoRegisterSuite.h : updated doc. * include/cppunit/extensions/HelperMacros.h : added macro CPPUNIT_TEST_SUITE_NAMED_REGISTRATION to register a suite into a named suite. Updated doc. * examples/cppunittest/CoreSuite.h: * examples/cppunittest/ExtensionSuite.h: * examples/cppunittest/HelperSuite.h: added, declaration of suite for use with CPPUNIT_TEST_SUITE_NAMED_REGISTRATION. * examples/cppunittest/makefile.am : added HelperSuite.h, CoreSuite.h, ExtensionSuite.h, CppUnitTestSuite.h and CppUnitTestSuite.cpp. * examples/cppunittest/CppUnitTestSuite.*: added. * examples/cppunittest/ExceptionTest.cpp: * examples/cppunittest/TestAssertTest.cpp: * examples/cppunittest/TestCaseTest.cpp: * examples/cppunittest/TestFailureTest.cpp: * examples/cppunittest/TestListenerTest.cpp: * examples/cppunittest/TestResultTest.cpp: * examples/cppunittest/TestSuiteTest.cpp: moved into named suite "Core" using CPPUNIT_TEST_SUITE_NAMED_REGISTRATION. * examples/cppunittest/OrthodoxTest.cpp: * examples/cppunittest/RepeatedTest.cpp: * examples/cppunittest/TestDecoratorTest.cpp: * examples/cppunittest/TestSetUpTest.cpp: moved into named suite "Extension" using CPPUNIT_TEST_SUITE_NAMED_REGISTRATION. * examples/cppunittest/HelperMacrosTest.cpp: * examples/cppunittest/TestCallerTest.cpp: moved into named suite "Helper" using CPPUNIT_TEST_SUITE_NAMED_REGISTRATION. * examples/cppunittest/CppUnitTest.dsp : * examples/msvc6/CppUnitTestApp/CppUnitTestApp.dsp : added Makefile.am, HelperSuite.h, CoreSuite.h, ExtensionSuite.h, CppUnitTestSuite.h and CppUnitTestSuite.cpp.
* Added project cppunittest to examples/: unit tests to test cppunit.Baptiste Lepilleur2001-06-011-0/+14
added project cppunittest to examples/: unit tests to test cppunit. The main file is CppUnitTestMain.cpp. Unit tests have been implemented for TestCaller and TestListener. * added project CppUnitTestApp to examples/msvc6: graphical runner for cppunittest. * added TestListener to TestResult. It is a port of junit TestListener. * updated some .cvsignore to ignore files generated with VC++.