[Cppunit-devel] cppunit cvs update, TestResult spit
Brought to you by:
blep
From: Baptiste L. <gai...@fr...> - 2002-03-01 20:43:08
|
Well, we discussed a few months ago about the fact that TestResult had too much responsabilities. We had come to a consensus (I believe) that splitting the class along the responability "collect test result" and "manage the events" would be the answer to that problem. I've done so by extracting the class TestResultCollector, which as you guessed collect the test result. It is a TestListener that can be registered to TestResult. There should be little impact on application using CppUnit. If you had your own classes using TestResult to generate an output, in most case, replacing it by TestResultCollector should work. You can still create a TestResult that behave like the "old" one using dual inheritance (by subclassing TestResult and TestResultCollector). Look at TextTestResult for an example of that "trick". Also, notes that the signature of the method addFailure() in TestListener have been changed, and that TextTestRunner::result() returns a reference instead of a pointer. That change had little impact on cppunit (only classes using TestResult to output the test result where impacted), though it had a wider impact on cppunit unit testing suites. As a consequence, many of cppunit test cases have been rewritten/cleaned up. For more detail on the change, look up the NEWS file: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/cppunit/cppunit/NE WS?rev=1.15 I'll make a tar ball preview as soon as I can. Any remarks is welcome, Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/ Baptiste. |