diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-06-16 16:55:58 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-06-16 16:55:58 +0000 |
| commit | 0a810d68d0550ba6f7f28f2e0dfcef691bdca7b4 (patch) | |
| tree | a060d291bf0dfb6c75720ecbce7f27927b326a5b /include/cppunit/XmlOutputterHook.h | |
| parent | 73a038f1eaa268cec330d971fb550befec6f7798 (diff) | |
| download | cppunit-0a810d68d0550ba6f7f28f2e0dfcef691bdca7b4.tar.gz | |
Release 1.
release 1.9.8
* include/cppunit/plugin/TestPlugIn.h: updated documentation.
* include/cppunit/tools/XmlDocument.h: updated documentation.
* include/cppunit/tools/StringTools.h:
* src/cppunit/StringTools.cpp: added split() and wrap() functions.
* include/cppunit/CompilerOutputter.h:
* src/cppunit/CompilerOutputter.cpp: extracted wrap() and
splitMessageIntoLines() to StringTools.
* include/cppunit/XmlOutputterHook.h:
* src/cppunit/XmlOutputterHook.cpp: removed rooNode parameter from
beginDocument() and endDocument(). It can be retreive from document.
Renamed 'node' occurences to 'element'.
* include/cppunit/XmlOutputter.h:
* src/cppunit/XmlOutputter.cpp: updated against
XmlOutputterHook changes. Renamed 'node' occurences to 'element'.
* examples/ClockerPlugIn/ClockerXmlHook.h:
* examples/ClockerPlugIn/ClockerXmlHook.cpp: updated against
XmlOutputterHook changes.
* examples/cppunittest/XmlElementTest.h:
* examples/cppunittest/XmlElementTest.cpp: Renamed 'node' occurences
to 'element'.
* examples/cppunittest/XmlOutputterTest.cpp: updated against
XmlOutputterHook changes.
* examples/cppunittest/StringToolsTest.h:
* examples/cppunittest/StringToolsTest.cpp: added. Unit tests for
StringTools. Turn out that VC++ dismiss empty lines in tools output,
which is the reason why empty lines where not printed in
CompilerOutputter.
Diffstat (limited to 'include/cppunit/XmlOutputterHook.h')
| -rw-r--r-- | include/cppunit/XmlOutputterHook.h | 51 |
1 files changed, 42 insertions, 9 deletions
diff --git a/include/cppunit/XmlOutputterHook.h b/include/cppunit/XmlOutputterHook.h index b67c6cf..57d1440 100644 --- a/include/cppunit/XmlOutputterHook.h +++ b/include/cppunit/XmlOutputterHook.h @@ -15,27 +15,60 @@ class XmlElement; /*! \brief Hook to customize Xml output. + * + * XmlOutputterHook can be passed to XmlOutputter to customize the XmlDocument. + * + * Common customizations are: + * - adding some datas to successfull or failed test with + * failTestAdded() and successfulTestAdded(), + * - adding some statistics with statisticsAdded(), + * - adding other datas with beginDocument() or endDocument(). + * + * See examples/ClockerPlugIn which makes use of most the hook. + * + * %Test plug-ins can also implement hook to customize XML output. + * + * \see XmlOutputter, CppUnitTestPlugIn. */ class CPPUNIT_API XmlOutputterHook { public: - virtual void beginDocument( XmlDocument *document, - XmlElement *rootNode ); - - virtual void endDocument( XmlDocument *document, - XmlElement *rootNode ); - + /*! Called before any elements is added to the root element. + * \param document XML Document being created. + */ + virtual void beginDocument( XmlDocument *document ); + + /*! Called after adding all elements to the root element. + * \param document XML Document being created. + */ + virtual void endDocument( XmlDocument *document ); + + /*! Called after adding a fail test element. + * \param document XML Document being created. + * \param testElement <FailedTest> element. + * \param test Test that failed. + * \param failure Test failure data. + */ virtual void failTestAdded( XmlDocument *document, - XmlElement *testNode, + XmlElement *testElement, Test *test, TestFailure *failure ); + /*! Called after adding a successful test element. + * \param document XML Document being created. + * \param testElement <Test> element. + * \param test Test that was successful. + */ virtual void successfulTestAdded( XmlDocument *document, - XmlElement *testNode, + XmlElement *testElement, Test *test ); + /*! Called after adding the statistic element. + * \param document XML Document being created. + * \param statisticsElement <Statistics> element. + */ virtual void statisticsAdded( XmlDocument *document, - XmlElement *statisticsNode ); + XmlElement *statisticsElement ); }; |
