[Laszlo-dev] problem porting lzunit to swf9

P T Withington ptw at pobox.com
Fri Jul 4 05:56:13 PDT 2008


I modelled this on how junit did it. But maybe we could just make the  
TestCase class add itself to a list in its construct or init method?

On Jul 4, 2008, at 0:46, "Henry Minsky" <hminsky at laszlosystems.com>  
wrote:

> The TestSuite class in lzunit relies on iterating over all the
> properties of a TestCase to find its methods who are named "testXXX".
>
> It does
>
>            var sv = subviews[this.nextCase];
>            dw("TestSuite.initSuite: subviews[", this.nextCase, "] =  
> ", sv);
>            if (sv instanceof lz.TestCase)
>            {
>                for (var n in sv) {
>                    var t = sv[n];
>
> Which will not do anything useful in swf9, because methods are not  
> properties.
>
> If the methods are declared public, then I could use the XML
> introspection feature of swf9.
>
> Or maybe we should have a more portable way to declare testcases, like
> how lztest makes you
> add them explicitly..
>
>
>
>
> -- 
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com


More information about the Laszlo-dev mailing list