SUnit Testing merged with Examples for Methods

Ted Kaehler Ted at SqueakLand.org
Fri Nov 30 21:48:55 UTC 2001


At 4:04 PM -0500 11/30/01, Pennell, David wrote:
[snip]
>[snip] use the standard method
>category with a naming convention (SUnit-performance,...) instead
>of relying on a naming convention for methods.

This is an excellent idea that solves the problem very nicely.  Any 
class that has test methods, simply puts them in some category that 
begins with 'SUnit'.  TestRunner can find them from that.

-----------
At 10:24 PM +0100 11/30/01, ducasse wrote:
>The point of the class in SUnit is that it represents the context of the
>test. So I can have multiple instance variables and each method represent a
>test and share this context.
>With this merge we will end up  to have the possibility or to simply express
>test or to use TestCase. However I'm wondering what this would means from a
>model point of view: metaclass will have another responsibility that is not
>only representing metaclass but also TestCase.

Yes, it is true that I am not prepared to introduce new instance 
variables into a metaclass to hold context across tests.  But, a lot 
can be done without that.  Perhaps one of you can suggest some kind 
of extension or workaround when inst vars are really needed in a 
TestCase class?

--Ted.
-- 
Ted Kaehler         http://www.squeakland.org/~ted/
When we were young, we were told that "everybody else is doing it" 
was a really stupid reason to do something.  Now it's the standard 
reason for picking a particular software package. -- Barry Gehm




More information about the Squeak-dev mailing list