[Cppunit-devel] CppUnit 1.9.8 tar ball
Brought to you by:
blep
From: Baptiste L. <gai...@fr...> - 2002-06-16 19:29:42
|
Well, the TODO is finally shrinking a lot. I fell the next stable release getting closer... Two majors features: macros to add custom tests to your suite, and XmlOutputter customization. I'd really like to have feedback on those two (needed adjustment...). The tar balls can be found at: http://cppunit.sourceforge.net/snapshot/ http://cppunit.sourceforge.net/snapshot/cppunit-1.9.8.tar.gz http://cppunit.sourceforge.net/snapshot/cppunit-docs-1.9.8.tar.gz Enjoy, Baptiste. New in CppUnit 1.9.8: --------------------- - New custom test macros - Exception message are now structured - Added detail field to MFC TestRunner - New XmlDocument class to easily create new XML output format - XmlOutputter customization - Test plug-in XMLOutputter hook - ClockerPlugIn example includes test time in XML output - DllPlugInTester allows test plug-in to hook the XmlOutputter - Configurable CompilerOutputter wrapping * New custom test macros - 3 new macros have been added for use when declaring test fixture suite: - CPPUNIT_TEST_CUSTOM : to specify a method that returns an instance of Test to add to the suite - CPPUNIT_TEST_CUSTOM : to specify a method that add some tests to the suite - CPPUNIT_TEST_ADD : to add a test to the suite. Used this to create custom CPPUNIT_TEST_xxx macros. See macros documentation for examples and details. * Exception message - Exception message are now stored in a Message object instead of a string. A message is composed of two items: - a short description (~20/30 characters) - a list of detail strings The short description is used to indicate how the detail strings should be interpreted. It usually indicates the failure types, such as "assertion failed", "forced failure", "unexpected exception caught", "equality assertion failed"... It should not contains new line characters (\n). Detail strings are used to provide more information about the failure. It can contains the asserted expression, the expected and actual values in an equality assertion, some addional messages... Detail strings can contains new line characters (\n). This change allow ouputters to deal with all failure the same way (there is no special case for the equality assertion any more). * New XmlDocument class to easily create new XML output format - Classes XmlDocument and XmlElement where extracted from XmlOutputter. This help writing outputters that use a completly different XML format. - XmlDocument represents a XML file, and XmlElement represents a XML element. * XmlOutputter customization - Xml output can be customized using XmlOutputterHook. To do so, subclass XmlOutputterHook and register it to the XmlOutputter with addHook() before call XmlOutputter::write(). Hook can be used to add some datas to the XmlDocument or the XmlElement of a specific hook. Methods have been added to XmlElement to help navigating and modifying the XmlDocument. See ClockerPlugIn example. * MFC TestRunner - The name of the test is displayed just before being run. - Browse Test Hierarchy dialog is resizable. - Better (and cleaner) handling of windows resizing - Failure list now only show the short description of the failure. - Edit field added to display the details of the selected failure. * MFC test plug-in runner (TestPlugInRunner): - command line: a dll name can be specified on the command after -testsuite: example: TestPlugInRunnerd.exe -testsuite Simpled.dll - Layout configuration is stored/restored. * Test plug-in XML output Hook - TestPlugIn interface provides a mean for plug-in to register hook for XML output. Practically, this allow plug-in to add specific data to the output. See ClockerPlugIn example, which add timing datas to the xml output. * DllPlugInTester: - added option -w / --wait to wait for the user to press a key before exiting. - plug-in can now provides XmlOutputterHook to add specific datas to the XML ouput. See ClockerPlugIn example. * CompilerOutputter wrapping is parametrized - Wrap column can be set with setWrapColumn(). Default is now 79 instead of 80. - Wrapping can be disabled with setNoWrap(). * Examples: - ClockerPlugIn: the example now use the new XmlOutputterHook. Test time are now included in the XML output. See examples/ClockerPlugIn/ReadMe.txt for details. * Bug Fix: - CompilerOutputter: fixed wrapping issues (UT magic!) - DllPlugInTester: use ISO-LATIN1 encoding if none is given. Flag --xsl was ignored. - MfcUi plug-in runner (TesTPlugInRunner): better handling of history when loading and reloading a dll. - Qt Test Runner: minor bug fixes. Should compile on Unix. - XmlOutputter: use the default encoding if an empty string is given as encoding * Compatibility Break: - CompilerOutputter: removed printNotEqualMessage() and printDefaultMessage(). No longer needed since Exception message are processed in a generic way. Removed wrap(). Extracted to StringTools. - Exception constructor takes a Message instead of a string. Notes that the first argument in Message constructor is a short description, not the message. Therefore, the change will usualy have the following form: Exception( Message( "assertion failed", oldMessage ) ); You may want to use Asserter functions instead of constructing and throwing the exception manually. - TestPlugInAdapter: renamed TestPlugInDefaultImpl. - TestSuiteBuilder: removed default constructor. All remaining constructors take an additional argument of type TestNamer used to specify the fixture named and generate test case name. Remove template method addTestCallerForException(). Use addTest() instead (see CPPUNIT_TEST_EXCEPTION implementation). - TextTestResult: most printing method were removed. This task is now delegated to TextOuputter. - XmlElement: renamed addNode() to addElement(). - XmlOutputter: removed methods writeProlog() and writeTestResult() which are replaced by XmlDocument. Renamed makeRootNode() to setRootNode(). It no longer returns the root node, but set the root node of the XML document. - XmlOuputter::Node: class has been extracted and renamed XmlElement. * Deprecated: - Asserter: all functions that use a string for the failure message. Construct a Message instead (see Exception constructor compatiblity break and Exception message feature). --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/ |