[Newbies] Should SUnit tests always have tearDown code?
andy.burnett at knowinnovation.com
Tue Sep 30 22:07:27 UTC 2008
I have discovered that my 'dead instances' were actually being created by
the TestRunner. I was surprised about that, because, I had assumed, that
when I closed the TestRunner window, all the instances that I had created in
the setUp code, would be Garbage Collected. Just to be clear my setUp code
was doing nothing more complicated than e.g.
fspace := Fspace new.
When I added tearDown routines to all the tests, e.g.
fspace := nil.
The problem went away. Is this simply how the TestRunner works, or am I
doing something wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners