[ENH][TEST] ClassBuilder format tests

ducasse ducasse at iam.unibe.ch
Sun Jan 4 20:37:35 UTC 2004


On 4 janv. 04, at 21:23, Andreas Raab wrote:

> Hi Stef,
>
>> I was looking at your tests. I want them in the image :)
>> I was wondering why you do not use tearDown to clean your stuff.
>
> I needed to clean up inbetween each individual test and tearDown is 
> only
> called when all the tests are run (e.g., after the entire suite 
> completed).

No tearDown is run after each tests. I was forced to extend SUnit to 
provide the behavior
you describe because our test suite was taking too much time, so I'm 
really sure about this
behavior. In fact setU and tearDown are always run before and after 
each tests because they control
the contex.

> Since I was too lazy to write new test cases for each of the 
> invariants I
> decided to clean up manually.
>
>> My interpretation
>> of it was that tearDown would clean well even in presence of halt, and
>> other errors.
>
> It sure does, but ClassBuilder also prevents (correctly) a reshape if
> instances cannot be converted, e.g.,
>
> Bitmap subclass: #FooSubclass.
> ByteArray subclass: #FooSubclass.
>
> will fail as ClassBuilder couldn't mutate the instances of FooSubclass
> correctly. And yes, this should be covered by another bunch of tests 
> but
> being a lazy guy I hope that someone else is going to write them ;-)

;)
Noury started to rewrite completely the classbuilder but he got glued 
into teaching
and other less fun activities.

>
> Cheers,
>   - Andreas
>
>




More information about the Squeak-dev mailing list