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

Mariano Martinez Peck marianopeck at gmail.com
Fri Mar 27 04:55:27 UTC 2009


On Thu, Mar 26, 2009 at 7:16 AM, Keith Hodges <keith_hodges at yahoo.co.uk>wrote:

> 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
>

Ok. Thanks. I wasn't aware of that. I look at it, I add a class side method
in my super test class like this:

shouldInheritSelectors
    ^ true

but still doesn't work and I am having the same error. What I am doing wrong
?

thanks in advance

mariano


>
> #shouldInheritSelectors has to be explicitly set, rather than guessed at.
>
> Keith
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090327/31984fe3/attachment.htm


More information about the Squeak-dev mailing list