[squeak-dev] Re: Problem with supperclasses in Sunit

Keith Hodges keith_hodges at yahoo.co.uk
Thu Mar 26 10:16:21 UTC 2009


Andreas Raab wrote:
> Mariano Martinez Peck wrote:
>> On Thu, Mar 26, 2009 at 1:22 AM, Andreas Raab <andreas.raab at gmx.de
>> <mailto:andreas.raab at gmx.de>> wrote:
>>
>>     SUnit will only use inherited test selectors if the superclass is
>>     declared as abstract. I find this horribly annoying but that's the
>>     way it is. You'll have to implement something like:
>>
>>     SuperTest class>>isAbstract
>>            ^self == SuperTest "NOT ^true since this makes subclasses
>>     abstract too"
>>
>>     See ToolBuilderTests and its subclasses for an example.
>>
>>
>> It doesn't work :(  I tried it with my class and also with
>> MVCToolBuilderTests. In both cases I get this wallback:
>>
>> any ideas?
>
> Well, that's because you have some non-standard patches to SUnit
> loaded. If you use a straight 3.10.2 image it doesn't even include
> methods like #allSelectorsBelow: or #withInheritedSelectors that show
> up in your call stack.
>
> I suggest you don't just load every random "enhancement" you find on
> the net in particular when it comes to something as fundamental as
> SUnit ;-)
>
> Cheers,
>   - Andreas
RTFM.... The class comment explains

#shouldInheritSelectors has to be explicitly set, rather than guessed at.

Keith







More information about the Squeak-dev mailing list