Re: [Cppunit-devel] include directory clean-up
Brought to you by:
blep
From: Baptiste L. <bl...@cl...> - 2001-06-14 21:09:10
|
> Quoting "Steve M. Robbins" <ste...@vi...>: > > > On Thu, Jun 14, 2001 at 04:39:41PM +0200, Baptiste Lepilleur wrote: > > I think that drafting an outline of the library will help in > > organizing the directory structure (and possibly the namespace > > structure). Questions that I have, for example: what is the > > difference between an "extension" and a "helper"? What is the "core" > > of the framework, anyway? > > I'll try to define those as I perceive them: > > core: it is the minimal(not really) set of classes for unit testing. It > provides the following functionnalities: > - writing (TestAssert) and running test (Test). > - report test failure > (TestCase,TestResult,Exception,NotEqualException,TestListener) > - organize test in suite (TestSuite) > I would also include: > - being able to write a test in a single class method (TestCaller) > - should be extensible > > extensions: they extends the functionnalities provided by the framework. > helper(s?): they don't add functionnalities but make using existing > functionnalities easier. I admit the difference can be tricky. Does the TestFactoryRegistry add to the core functionnality ? I would say no: you can't do anymore than you were doing. It only make it easier: you don't have to create class for each suite, remember to add the new suite in the suite... You even lose extensibility: the suite instantiated will all be TestSuite. You lose some portability (it use a static variable and it has been reported that some compiler on embedded do not support this well). The macros case is a bit easier: they help you implement your everyday test case. The TestSuiteBuilder ? Well, it's just a factorization of the code that is commonly used to construct a suite. But it also adds a functionnality: TestCase name extraction using RTTI (note, that it was originaly located in the TestSuite constructor, which make more sense to me). TestSetUp allow you to set up an environment to run a test. RepeatedTest allow you to run a test a specified number of times. For those last two, their only purpose is to provide new functionnalities. So the edge is somewhat blurred. The hardest to define probably being the TestFactoryRegistry. Ahh, I think I found a good criteria: "If you did not have this class, could you do what it is doing without rewriting it ? If so, then it is not an extension". I hope this help, it sure sharpened some blurred shapes for me. I like that last criteria. Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html Author of The Text Reformatter, a tool for fanfiction readers and writers. Language: English, French (Well, I'm French). |