SUnit Testing merged with Examples for Methods
Andrew P. Black
black at iam.unibe.ch
Fri Nov 30 21:33:35 UTC 2001
At 11:32 -0800 2001.11.30, Ted Kaehler wrote:
Ted,
I really do applaud your efforts to include testing into the Squeak
culture. The lack of comprehensive testing has really slowed us
down, since every new feature has broken something old, but we never
found about about this in a timely fashion.
I didn't follow the details of all of the changes that you propose.
But I endorse the principle. An example would make it much easier to
understand what you have done, I think.
>(In the future, we'd like to have the kind of TestCases that SUnit
>has now, but not have the overhead of doubling the number of
>classes. One way to do this is to make Metaclass do everything that
>TestCase does. The individual testing methods would begin with a
>standard prefix like 'textSU'. Any class that has a method whose
>name begins with 'textSU' would be found by TestRunner, and entered
>into its list. Any comments on this?)
How about having a method on a class that answers a collection of
method selectors that are the tests for instances of that class? The
inherited implementation could select all of the methods that contain
a particular prefix, but any class could override this method to do
something different, if desired.
Andrew
More information about the Squeak-dev
mailing list
|