summaryrefslogtreecommitdiff
path: root/include/cppunit
diff options
context:
space:
mode:
authorBaptiste Lepilleur <gaiacrtn@free.fr>2002-03-25 21:35:34 +0000
committerBaptiste Lepilleur <gaiacrtn@free.fr>2002-03-25 21:35:34 +0000
commit1670f83c25440fbf021da923b63f24d724a3d0f7 (patch)
tree3e40888682c53e878b548b1092065a6ea022de25 /include/cppunit
parent38e67ef2e0084b295fc666df4f71bdeb08d87740 (diff)
downloadcppunit-1670f83c25440fbf021da923b63f24d724a3d0f7.tar.gz
Include/cppunit/makefile.
include/cppunit/makefile.am: removed TestRegistry.h * include/cppunit/TestRegistry.h: removed. Obsolete, replaced by TestFactoryRegistry. * src/cppunit/makefile.am: removed TestRegistry.cpp. Added cppunit_dll.dsp. * include/cppunit/CompilerOutputter.h: * include/cppunit/NotEqualException.h: * include/cppunit/SynchronizedObject.h: * include/cppunit/TestFixture.h: * include/cppunit/TestListener.h: * include/cppunit/TestResult.h: * include/cppunit/TestSucessListener.h: * include/cppunit/TextOutputter.h: * include/cppunit/TextTestProgressListener.h: * include/cppunit/TextTestResult.h: * include/cppunit/XmlOutputter.h: * include/cppunit/extensions/TestFactory.h: * include/cppunit/extensions/TestFactoryRegistry.h: * include/cppunit/extensions/TestSuiteBuilder.h: * include/cppunit/extensions/TestSuiteFactory.h: minor doc update. * include/cppunit/TestFixture.h: added DLL export. * include/cppunit/msvc6/TestPlugInInterface.h: updated doc. Added automatic exportation of TestPlugIn publishing function. * src/cppunit/TestCase.cpp: * include/cppunit/TestCase.h: inherits setUp() and tearDown() from class TestFixture.
Diffstat (limited to 'include/cppunit')
-rw-r--r--include/cppunit/CompilerOutputter.h4
-rw-r--r--include/cppunit/Makefile.am1
-rw-r--r--include/cppunit/NotEqualException.h10
-rw-r--r--include/cppunit/SynchronizedObject.h2
-rw-r--r--include/cppunit/TestCase.h10
-rw-r--r--include/cppunit/TestFixture.h15
-rw-r--r--include/cppunit/TestListener.h4
-rw-r--r--include/cppunit/TestResult.h8
-rw-r--r--include/cppunit/TestSucessListener.h2
-rw-r--r--include/cppunit/TextOutputter.h2
-rw-r--r--include/cppunit/TextTestProgressListener.h4
-rw-r--r--include/cppunit/TextTestResult.h2
-rw-r--r--include/cppunit/XmlOutputter.h6
-rw-r--r--include/cppunit/extensions/TestFactory.h4
-rw-r--r--include/cppunit/extensions/TestFactoryRegistry.h4
-rw-r--r--include/cppunit/extensions/TestSuiteBuilder.h7
-rw-r--r--include/cppunit/extensions/TestSuiteFactory.h3
17 files changed, 51 insertions, 37 deletions
diff --git a/include/cppunit/CompilerOutputter.h b/include/cppunit/CompilerOutputter.h
index 3827017..73176ff 100644
--- a/include/cppunit/CompilerOutputter.h
+++ b/include/cppunit/CompilerOutputter.h
@@ -15,8 +15,8 @@ class Test;
class TestFailure;
class TestResultCollector;
-/*! \class CompilerOutputter
- * \brief This class implements output test result in a compiler compatible format.
+/*!
+ * \brief Outputs test results in a compiler compatible format.
*/
class CPPUNIT_API CompilerOutputter : public Outputter
{
diff --git a/include/cppunit/Makefile.am b/include/cppunit/Makefile.am
index 84f1afd..5e07820 100644
--- a/include/cppunit/Makefile.am
+++ b/include/cppunit/Makefile.am
@@ -21,7 +21,6 @@ libcppunitinclude_HEADERS = \
TestCaller.h \
TestFailure.h \
TestResult.h \
- TestRegistry.h \
TestResultCollector.h \
TestSucessListener.h \
TestSuite.h \
diff --git a/include/cppunit/NotEqualException.h b/include/cppunit/NotEqualException.h
index 3831247..197f3ce 100644
--- a/include/cppunit/NotEqualException.h
+++ b/include/cppunit/NotEqualException.h
@@ -6,10 +6,18 @@
namespace CppUnit {
-
+/*! \brief Exception thrown by failed equality assertions.
+ */
class CPPUNIT_API NotEqualException : public Exception
{
public:
+ /*! Constructs the exception.
+ * \param expected Text that represents the expected value.
+ * \param actual Text that represents the actual value.
+ * \param sourceLine Location of the assertion.
+ * \param additionalMessage Additionnal information provided to further qualify
+ * the inequality.
+ */
NotEqualException( std::string expected,
std::string actual,
SourceLine sourceLine = SourceLine(),
diff --git a/include/cppunit/SynchronizedObject.h b/include/cppunit/SynchronizedObject.h
index f9e498c..dac5792 100644
--- a/include/cppunit/SynchronizedObject.h
+++ b/include/cppunit/SynchronizedObject.h
@@ -7,7 +7,7 @@
namespace CppUnit
{
-/*! Base class for synchronized object.
+/*! \brief Base class for synchronized object.
*
* Synchronized object are object which members are used concurrently by mutiple
* threads.*
diff --git a/include/cppunit/TestCase.h b/include/cppunit/TestCase.h
index b1a5652..4bdb535 100644
--- a/include/cppunit/TestCase.h
+++ b/include/cppunit/TestCase.h
@@ -4,6 +4,7 @@
#include <cppunit/Portability.h>
#include <cppunit/Test.h>
#include <cppunit/TestAssert.h>
+#include <cppunit/TestFixture.h>
#include <string>
@@ -88,8 +89,8 @@ class TestResult;
* \see TestCaller
*
*/
-
-class CPPUNIT_API TestCase : public Test
+class CPPUNIT_API TestCase : public Test,
+ public TestFixture
{
public:
@@ -105,11 +106,6 @@ public:
//! FIXME: what is this for?
virtual TestResult *run();
-
- // FIXME: move back to class TestFixture, in future.
- virtual void setUp();
- virtual void tearDown();
-
protected:
//! FIXME: this should probably be pure virtual.
diff --git a/include/cppunit/TestFixture.h b/include/cppunit/TestFixture.h
index 8fc840d..db763de 100644
--- a/include/cppunit/TestFixture.h
+++ b/include/cppunit/TestFixture.h
@@ -1,26 +1,27 @@
#ifndef CPPUNIT_TESTFIXTURE_H // -*- C++ -*-
#define CPPUNIT_TESTFIXTURE_H
+#include <cppunit/Portability.h>
namespace CppUnit {
-/*! Wrap a test case with setUp and tearDown methods.
+/*! \brief Wraps a test case with setUp and tearDown methods.
*
* A TestFixture is used to provide a common environment for a set
* of test cases.
*
*/
-class TestFixture
+class CPPUNIT_API TestFixture
{
public:
- virtual ~TestFixture() {};
+ virtual ~TestFixture() {};
- //! \brief Set up context before running a test.
- virtual void setUp() {};
+ //! \brief Set up context before running a test.
+ virtual void setUp() {};
- //! Clean up after the test run.
- virtual void tearDown() {};
+ //! Clean up after the test run.
+ virtual void tearDown() {};
};
diff --git a/include/cppunit/TestListener.h b/include/cppunit/TestListener.h
index 17a550e..f0df2a1 100644
--- a/include/cppunit/TestListener.h
+++ b/include/cppunit/TestListener.h
@@ -11,7 +11,9 @@ class Test;
class TestFailure;
-/*! TestListener is the interface implemented by classes which want to be notified
+/*! \brief Listener for test progress and result.
+ *
+ * TestListener is the interface implemented by classes which want to be notified
* of the progress and result of a test run.
*
* \see TestResult
diff --git a/include/cppunit/TestResult.h b/include/cppunit/TestResult.h
index 4d504e2..ecfd25d 100644
--- a/include/cppunit/TestResult.h
+++ b/include/cppunit/TestResult.h
@@ -22,9 +22,7 @@ class TestListener;
template class CPPUNIT_API std::deque<TestListener *>;
#endif
-/**
- * A TestResult collects the results of executing a test case. It is an
- * instance of the Collecting Parameter pattern.
+/*! Manages TestListener.
*
* FIXME: NEED UPDATE (main responsibilty is to act as an event manager)
*
@@ -33,11 +31,11 @@ class TestListener;
* unanticipated problems signified by exceptions that are not generated
* by the framework.
*
- * TestResult supplies a template method 'setSynchronizationObject ()'
+ * TestResult supplies a template method 'setSynchronizationObject()'
* so that subclasses can provide mutual exclusion in the face of multiple
* threads. This can be useful when tests execute in one thread and
* they fill a subclass of TestResult which effects change in another
- * thread. To have mutual exclusion, override setSynchronizationObject ()
+ * thread. To have mutual exclusion, override setSynchronizationObject()
* and make sure that you create an instance of ExclusiveZone at the
* beginning of each method.
*
diff --git a/include/cppunit/TestSucessListener.h b/include/cppunit/TestSucessListener.h
index bdaa60d..410049f 100644
--- a/include/cppunit/TestSucessListener.h
+++ b/include/cppunit/TestSucessListener.h
@@ -8,7 +8,7 @@
namespace CppUnit
{
-/*! A TestSucessListener is a TestListener which check if any test case failed.
+/*! \brief TestListener that checks if any test case failed.
*/
class CPPUNIT_API TestSucessListener : public TestListener,
public SynchronizedObject
diff --git a/include/cppunit/TextOutputter.h b/include/cppunit/TextOutputter.h
index 6ce0b61..2ebffe2 100644
--- a/include/cppunit/TextOutputter.h
+++ b/include/cppunit/TextOutputter.h
@@ -14,7 +14,7 @@ class TestResultCollector;
class TestFailure;
-/*! Print a TestResultCollector in text format.
+/*! \brief Prints a TestResultCollector to a text stream.
*/
class CPPUNIT_API TextOutputter : public Outputter
{
diff --git a/include/cppunit/TextTestProgressListener.h b/include/cppunit/TextTestProgressListener.h
index b65c16a..6a5775f 100644
--- a/include/cppunit/TextTestProgressListener.h
+++ b/include/cppunit/TextTestProgressListener.h
@@ -7,8 +7,8 @@
namespace CppUnit
{
-/*! \class TextTestProgressListener
- * \brief This class represents
+/*!
+ * \brief TestListener that show the status of each TestCase test result.
*/
class CPPUNIT_API TextTestProgressListener : public TestListener
{
diff --git a/include/cppunit/TextTestResult.h b/include/cppunit/TextTestResult.h
index 78ddaa2..4e355bc 100644
--- a/include/cppunit/TextTestResult.h
+++ b/include/cppunit/TextTestResult.h
@@ -11,7 +11,7 @@ class SourceLine;
class Exception;
class Test;
-/*! Holds printable test result (DEPRECATED).
+/*! \brief Holds printable test result (DEPRECATED).
*
* Use class TextTestProgressListener and TextOutputter instead.
*/
diff --git a/include/cppunit/XmlOutputter.h b/include/cppunit/XmlOutputter.h
index 92acc29..45e824e 100644
--- a/include/cppunit/XmlOutputter.h
+++ b/include/cppunit/XmlOutputter.h
@@ -24,7 +24,7 @@ class TestFailure;
class TestResultCollector;
-/*! Outputs a TestResultCollector in XML format.
+/*! \brief Outputs a TestResultCollector in XML format.
*/
class CPPUNIT_API XmlOutputter : public Outputter
{
@@ -38,7 +38,7 @@ public:
/// Destructor.
virtual ~XmlOutputter();
- /*! Write the specified result as an XML document in the specified stream.
+ /*! Writes the specified result as an XML document in the specified stream.
*
* Refer to examples/cppunittest/XmlOutputterTest.cpp for example
* of use and XML document structure.
@@ -48,7 +48,7 @@ public:
*/
virtual void write();
- /*! This class represents an XML Element.
+ /*! \brief An XML Element.
* \warning This class will probably be replaced with an abstract
* builder in future version.
*/
diff --git a/include/cppunit/extensions/TestFactory.h b/include/cppunit/extensions/TestFactory.h
index 3b1f001..3a964b6 100644
--- a/include/cppunit/extensions/TestFactory.h
+++ b/include/cppunit/extensions/TestFactory.h
@@ -7,14 +7,14 @@ namespace CppUnit {
class Test;
-/** This class represents an abstract Test factory.
+/*! \brief Abstract Test factory.
*/
class CPPUNIT_API TestFactory
{
public:
virtual ~TestFactory() {}
- /** Makes a new test.
+ /*! Makes a new test.
* \return A new Test.
*/
virtual Test* makeTest() = 0;
diff --git a/include/cppunit/extensions/TestFactoryRegistry.h b/include/cppunit/extensions/TestFactoryRegistry.h
index 1484977..3d715a1 100644
--- a/include/cppunit/extensions/TestFactoryRegistry.h
+++ b/include/cppunit/extensions/TestFactoryRegistry.h
@@ -21,9 +21,9 @@ class TestSuite;
#endif
-/** This class implements a registry for test factory.
+/*! \brief Registry for test factory.
*
- * Note that the registry assume lifetime control for any registered test.
+ * Notes that the registry assumes lifetime control for any registered test.
*/
class CPPUNIT_API TestFactoryRegistry : public TestFactory
{
diff --git a/include/cppunit/extensions/TestSuiteBuilder.h b/include/cppunit/extensions/TestSuiteBuilder.h
index bcddfee..44ad3fc 100644
--- a/include/cppunit/extensions/TestSuiteBuilder.h
+++ b/include/cppunit/extensions/TestSuiteBuilder.h
@@ -12,6 +12,13 @@
namespace CppUnit {
+ /*! \brief Helper to add test to a TestSuite.
+ *
+ * All test added to the TestSuite are prefixed by TestSuite name. The resulting
+ * Test name has the following pattern:
+ *
+ * MyTestSuiteName.myTestName
+ */
template<typename Fixture>
class TestSuiteBuilder
{
diff --git a/include/cppunit/extensions/TestSuiteFactory.h b/include/cppunit/extensions/TestSuiteFactory.h
index cc07471..567812d 100644
--- a/include/cppunit/extensions/TestSuiteFactory.h
+++ b/include/cppunit/extensions/TestSuiteFactory.h
@@ -7,6 +7,9 @@ namespace CppUnit {
class Test;
+ /*! \brief TestFactory for TestFixture that implements a static suite() method.
+ * \see AutoRegisterSuite.
+ */
template<typename TestCaseType>
class TestSuiteFactory : public TestFactory
{