[Seaside] GRSlimeTest>>#run:do: question

Lukas Renggli renggli at gmail.com
Sun Jan 15 09:47:12 UTC 2012

Hi Paul,

I guess this question is targeted at me, but I don't quite understand it :-)

What GRSlimeTest>>#run:do: ensures is that exactly one rule triggers
for a bogus source artifact. If your rules make some other rules to
fail, you either have to restrict your rules further or we have to
find better examples of how to test the existing rules.


On 12 January 2012 23:47, Paul DeBruicker <pdebruic at gmail.com> wrote:
> I'm made some Amber specific portability Slime rules using the Grease-Slime
> package as a model of how-to-do-it. They are here:
> http://www.squeaksource.com/AmberSlime.
> In GRSlimeTest>>#run:do: After the RBSmalllintChecker runs the composite
> rule it checks the validity of the results by testing
>        rules
>                do: [ :each |
>                        self
>                                assert: (rule = each or: [ each result
> isEmpty and: [ each changes isEmpty ] ])
>                                description: each name , ' should not report
> errors' ].
> In Amber there aren't globals so each reference to 'Smalltalk' must be
> rewritten to 'Smalltalk current'. I've written two rules that address this:
> #AMSmalltalkGlobalRule & #AMSmalltalkToSmalltalkCurrentRule.
> #AMSmalltalkGlobalRule compiles a list of the #references: to #Smalltalk and
> #AMSmalltalkToSmalltalkCurrentRule rewrites those references if the
> subsequent message send is not #current.
> When running the test suite the above bit of code in #run:do: causes the
> tests for  #AMSmalltalkToSmalltalkCurrentRule to fail because
> #AMSmalltalkGlobalRule always has a result for the test as I've written it.
> How can I rewrite the test for #AMSmalltalkToSmalltalkCurrentRule or rule
> for #AMSmalltalkGlobalRule so that it doesn't raise an error when testing
> another method?
> I could always just remove the error checking mechanism.
> Thanks in advance.
> Paul
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

Lukas Renggli

More information about the seaside mailing list