diff options
| -rw-r--r-- | ChangeLog | 13 | ||||
| -rw-r--r-- | include/cppunit/Outputter.h | 2 | ||||
| -rw-r--r-- | include/cppunit/SynchronizedObject.h | 6 | ||||
| -rw-r--r-- | include/cppunit/TestCaller.h | 2 | ||||
| -rw-r--r-- | include/cppunit/TestResult.h | 2 | ||||
| -rw-r--r-- | include/cppunit/TestResultCollector.h | 3 | ||||
| -rw-r--r-- | include/cppunit/TextTestRunner.h | 2 | ||||
| -rw-r--r-- | include/msvc6/testrunner/TestPlugInInterface.h | 2 | ||||
| -rw-r--r-- | include/msvc6/testrunner/TestRunner.h | 30 | ||||
| -rw-r--r-- | src/cppunit/Asserter.cpp | 48 |
10 files changed, 48 insertions, 62 deletions
@@ -1,5 +1,16 @@ 2002-03-27 Baptiste Lepilleur <gaiacrtn@free.fr> + * include/msvc/testrunner/TestRunner.h: updated doc. reindented. + + * include/cppunit/Asserter.h: + * include/cppunit/Asserter.cpp: + * include/cppunit/TestResultCollector.h: + * include/cppunit/TestResult.h: + * include/cppunit/SynchronizedObject.h: + * include/cppunit/extensions/TestCaller.h: doc update. + +2002-03-27 Baptiste Lepilleur <gaiacrtn@free.fr> + * makefile.am: added src/CppUnitLibraries.dsw, new contribution, and src/qttestrunner. @@ -9,7 +20,7 @@ bloodchen@hotmail.com. * constrib/msvc/readme.txt: updated. - + * include/cppunit/TestAsserter.h: * include/cppunit/SourceLine.h: updated doc. diff --git a/include/cppunit/Outputter.h b/include/cppunit/Outputter.h index 62ee1d0..1805dc9 100644 --- a/include/cppunit/Outputter.h +++ b/include/cppunit/Outputter.h @@ -7,7 +7,7 @@ namespace CppUnit { -/*! This class represents an abstract outputter. +/*! \brief Abstract outputter to print test result summary. */ class CPPUNIT_API Outputter { diff --git a/include/cppunit/SynchronizedObject.h b/include/cppunit/SynchronizedObject.h index dac5792..7ee8447 100644 --- a/include/cppunit/SynchronizedObject.h +++ b/include/cppunit/SynchronizedObject.h @@ -10,7 +10,7 @@ namespace CppUnit /*! \brief Base class for synchronized object. * * Synchronized object are object which members are used concurrently by mutiple - * threads.* + * threads. * * This class define the class SynchronizationObject which must be subclassed * to implement an actual lock. @@ -22,6 +22,8 @@ namespace CppUnit class CPPUNIT_API SynchronizedObject { public: + /*! \brief Abstract synchronization object (mutex) + */ class SynchronizationObject { public: @@ -40,6 +42,8 @@ public: virtual ~SynchronizedObject(); protected: + /*! \brief Locks a synchronization object in the current scope. + */ class ExclusiveZone { SynchronizationObject *m_syncObject; diff --git a/include/cppunit/TestCaller.h b/include/cppunit/TestCaller.h index 525e509..85c12d0 100644 --- a/include/cppunit/TestCaller.h +++ b/include/cppunit/TestCaller.h @@ -12,6 +12,7 @@ namespace CppUnit { +//! \internal class CPPUNIT_API NoExceptionExpected { private: @@ -20,6 +21,7 @@ private: }; +//! \internal template<typename ExceptionType> struct ExpectedExceptionTraits { diff --git a/include/cppunit/TestResult.h b/include/cppunit/TestResult.h index 2bbe322..5351436 100644 --- a/include/cppunit/TestResult.h +++ b/include/cppunit/TestResult.h @@ -22,7 +22,7 @@ class TestListener; template class CPPUNIT_API std::deque<TestListener *>; #endif -/*! Manages TestListener. +/*! \brief Manages TestListener. * * A single instance of this class is used when running the test. It is usually * created by the test runner (TextTestRunner). diff --git a/include/cppunit/TestResultCollector.h b/include/cppunit/TestResultCollector.h index f094f0a..c40282c 100644 --- a/include/cppunit/TestResultCollector.h +++ b/include/cppunit/TestResultCollector.h @@ -22,7 +22,7 @@ namespace CppUnit #endif -/*! +/*! \brief Collects test result. * A TestResultCollector is a TestListener which collects the results of executing * a test case. It is an instance of the Collecting Parameter pattern. * @@ -30,6 +30,7 @@ namespace CppUnit * A failure is anticipated and checked for with assertions. Errors are * unanticipated problems signified by exceptions that are not generated * by the framework. + * \see TestListener, TestFailure. */ class CPPUNIT_API TestResultCollector : public TestSucessListener { diff --git a/include/cppunit/TextTestRunner.h b/include/cppunit/TextTestRunner.h index 7bfc6d9..0d7a138 100644 --- a/include/cppunit/TextTestRunner.h +++ b/include/cppunit/TextTestRunner.h @@ -14,7 +14,7 @@ class TestResult; class TestResultCollector; /*! - * A text mode test runner. + * \brief A text mode test runner. * * The test runner manage the life cycle of the added tests. * diff --git a/include/msvc6/testrunner/TestPlugInInterface.h b/include/msvc6/testrunner/TestPlugInInterface.h index 64b48a4..e5d02b8 100644 --- a/include/msvc6/testrunner/TestPlugInInterface.h +++ b/include/msvc6/testrunner/TestPlugInInterface.h @@ -9,7 +9,7 @@ #include <cppunit/Test.h> -/*! Abstract TestPlugIn. +/*! \brief Abstract TestPlugIn for DLL. * * A Test plug-in DLL must subclass this class and "publish" an instance * using the following exported function: diff --git a/include/msvc6/testrunner/TestRunner.h b/include/msvc6/testrunner/TestRunner.h index 18478eb..d00eb3b 100644 --- a/include/msvc6/testrunner/TestRunner.h +++ b/include/msvc6/testrunner/TestRunner.h @@ -31,21 +31,37 @@ -// A Wrapper +/*! \brief MFC TestRunner + * Use this to launch the MFC TestRunner. Usually called from you CWinApp subclass: + * \code + * #include <msvc6/testrunner/TestRunner.h> + * #include <cppunit/extensions/TestFactoryRegistry.h> + * + * void + * CHostAppApp::RunUnitTests() + * { + * TestRunner runner; + * runner.addTest( CppUnit::TestFactoryRegistry::getRegistry().makeTest() ); + * + * runner.run(); + * } + * \endcode + * \see CppUnit::TextTestRunner, CppUnit::TestFactoryRegistry. + */ class AFX_EXT_CLASS TestRunner { public: - TestRunner (); - ~TestRunner (); + TestRunner(); + ~TestRunner(); - void run (); + void run(); - void addTest (CppUnit::Test *test); + void addTest( CppUnit::Test *test ); - void addTests (const std::vector<CppUnit::Test *> &tests); + void addTests( const std::vector<CppUnit::Test *> &tests ); protected: - CppUnit::Test * getRootTest(); + CppUnit::Test *getRootTest(); CppUnit::TestSuite *m_suite; diff --git a/src/cppunit/Asserter.cpp b/src/cppunit/Asserter.cpp index b6e5015..29c5201 100644 --- a/src/cppunit/Asserter.cpp +++ b/src/cppunit/Asserter.cpp @@ -6,54 +6,6 @@ namespace CppUnit { -/*! Asserter creates and throws failure exception. - * - * The following example show how to create an assertion that - * checks if two XML strings are equivalent (extract from - * XmlUniformiser.cpp of CppUnit test suite): - * - * \code - * // Asserts that two XML strings are equivalent. - * #define CPPUNITTEST_ASSERT_XML_EQUAL( expected, actual ) \ - * ::CppUnitTest::checkXmlEqual( expected, actual, \ - * CPPUNIT_SOURCELINE() ) - * void - * checkXmlEqual( std::string expectedXml, - * std::string actualXml, - * CppUnit::SourceLine sourceLine ) - * { - * std::string expected = XmlUniformiser( expectedXml ).stripped(); - * std::string actual = XmlUniformiser( actualXml ).stripped(); - * - * if ( expected == actual ) - * return; - * - * int index = notEqualIndex( expected, actual ); - * CppUnit::OStringStream message; - * message << "differ at index: " << index << "\n" - * << "expected: " << expected.substr(index) << "\n" - * << "but was : " << actual.substr( index ); - * ::CppUnit::Asserter::failNotEqual( expected, - * actual, - * sourceLine, - * message.str() ); - * } - * - * - * int - * notEqualIndex( std::string expectedXml, - * std::string actualXml ) - * { - * int index = 0; - * while ( index < actualXml.length() && - * index < expectedXml.length() && - * actualXml[index] == expectedXml[index] ) - * ++index; - * - * return index; - * } - * \endcode - */ namespace Asserter { |
