Crossplatform test plug-in is the main new feature.
I thing I got it working on both Unix and Windows (well, at least
compiling on Unix. Check UnixDynamicLibraryManager.cpp).
Though, I need the help of some automake/configure wizard to finalize
the thing:
The unix man page says that the dlXXX function use the dl.so library. This
means that the examples need to be linked with that library.
Now, dlopen(), dlclose() and dlsym() functions are only used if
CPPUNIT_NO_TESTPLUGIN is not defined and CPPUNIT_HAVE_DLFCN_H is defined
(see include/config/SelectDllLoader.h for detail). That means that the
library should only be linked in those case. How do you do that ?
This a blocking issue, at the current time, the example won't link on
Unix.
As usual, it can be found at: http://cppunit.sourceforge.net/snapshot/
http://cppunit.sourceforge.net/snapshot/cppunit-1.9.2.tar.gz
http://cppunit.sourceforge.net/snapshot/cppunit-docs-1.9.2.tar.gz
New in CppUnit 1.9.2:
----------------------
In short:
- Cleaner XML output
- Crossplatform Test plug-in
- TestPlugInSuite to wrap test plug-in
- More TestPlugIn documentation.
* TestPlugIn:
- The test plug-in functionnality has been rewritten from scrash.
TestPlugIn related macro are now crossplatform (exporting the plug-in
function from the dynamic library...).
- Class DynamicLibraryManager provides a generic way to access dynamic
library. Platform specific implementation provided for WIN32, unix,
BeOs.
Can be very easily ported to new platform.
- A More flexible and hopefully extensible interface has been introduced
(CppUnitPlugIn).
- A default implementation using the test factory registry is provided
(TestPlugInDefaultImpl). Can be easily customized.
- The one line test plug-in declaration was renamed
CPPUNIT_PLUGIN_IMPLEMENT.
See modules/Writing Test Plug-in documentation and
examples/EasyTestPlugIn.
* XmlOutputter:
- XML output is now indented. Nodes that don't have children are one line
tag. The output can now easily be read.
* Compatibility break:
- class TestSucessListener was renamed to TestSuccessListener.
- XmlOutput: renamed tag <SuccessfulTests> to <SuccessfulTests>
- Global fix of the 'success' typo (was misspelled 'sucess'). Main impacts
are listed
above, but check your own code in case you override some
protected/private methods.
- TestPlugInInterface (include/msvc6/TestPlugInInterface.h): this header
and class
are now obsolete. You should use include/cppunit/plugin/TestPlugIn.h
instead.
Macro CPPUNIT_TESTPLUGIN_IMPL have been replaced by
CPPUNIT_PLUGIN_IMPLEMENT.
- TestDecorator inherits Test instead of TestLeaf.
- DllPlugInTester only run DLL implementing the new new TestPlugIn
interface.
Baptiste.
|