And fresh eyes on old code usually always finds things that could be better. I can see an Array sort in there that was likely intended to be outside a loop instead of inside... oh well :)
On Mon, Sep 23, 2019 at 5:54 AM Greg Dove <[email protected]> wrote: > > Josh, here's how I was handling that metadata for the very lightweight > setup I did: > > https://github.com/apache/royale-asjs/blob/develop/manualtests/UnitTests/src/main/royale/testshim/RoyaleUnitTestRunner.as#L134 > > > Then the test would run the static BeforeClass, run the instance level > Before, run all the tests, run the instance level After, then run the > AfterClass. > I can't remember the details from when I did that, so can't say for sure > that it matches what FlexUnit was doing, but I guess my assumption has been > that it was close at the time. > > > On Mon, Sep 23, 2019 at 5:09 AM Greg Dove <[email protected]> wrote: > >> Yeah, iirc those metas run static methods before the test class instance >> is instantiated and again after the instance level AFTER method has run. At >> least that's how I think I did it in the manual test version. I don't use >> those much either. Also afk here for now.. can check later. >> >> On Mon, 23 Sep 2019, 04:53 Josh Tynjala, <[email protected]> >> wrote: >> >>> Is that metadata supposed to go on static methods? I guess I assumed >>> that, >>> like [Before] and [After], they're supposed to go on instance methods. >>> I've >>> never had a reason to use [BeforeClass] and [AfterClass] in a real world >>> project, so perhaps I should have looked at the FlexUnit examples more >>> closely. >>> >>> I'm not at my computer, so I can't look at the Reflection stuff right >>> now. >>> Greg might know, or I can look more closely later. >>> >>> - Josh >>> >>> On Sunday, September 22, 2019, Yishay Weiss <[email protected]> >>> wrote: >>> > Those are not working for me. >>> > >>> > I think the problem is that metadata is that only non-static methods >>> are >>> iterated when figuring out the meta-data. But then I run into a different >>> problem, which is how to invoke a static method with reflection. >>> > >>> > Any ideas? >>> > >>> > >>> >>> -- >>> -- >>> Josh Tynjala >>> Bowler Hat LLC <https://bowlerhat.dev> >>> >>
