|
From: Tom C. <tco...@go...> - 2007-02-13 13:02:06
|
Hi there, Following my previous mail I've done a bit of investigation. I've transferred a very simple example that works fine with the MXP Flash IDE version of ASUnit to my ASUnit 2.5 FlashDevelop/MTASC environment and when I add more than one TestCase to a TestSuite it falls over. Specifically, I think the setInterval in asunit.runner.BaseTestRunner is looping indefinitely: 47: intervalId = setInterval(this, "completionHandler", 1, suite, result, startTime); Following the code through, it looks as though in asunit.framework.TestSuitethere is a call to a global function (setTimeout) that I can't see defined anywhere else in the asunit package. 70: _global.setTimeout(this, "runTest", 10, itr, itr.next(), result); Looking at the change log, I'm guessing this part of the code may have been updated in r118. ------------------------------------------------------------------------ r118 | lukebayes | 2006-09-21 11:19:08 -0700 (Thu, 21 Sep 2006) | 1 line Changed paths: M /trunk/framework/as25/asunit/framework/TestSuite.as M /trunk/framework/as25/asunit/runner/BaseTestRunner.as A /trunk/framework/as25/asunit/util A /trunk/framework/as25/asunit/util/ArrayIterator.as A /trunk/framework/as25/asunit/util/ArrayIteratorTest.as A /trunk/framework/as25/asunit/util/Iterator.as added asynchronous execution of test suites to avoid script timeouts on large projects ------------------------------------------------------------------------ Maybe I'm doing something wrong, but I think now that there might be a bug here somewhere. I'm happy to send my file over if anyone wants to try it for themselves. Cheers, Tom On 12/02/07, Tom Cole <tco...@go...> wrote: > > Hi everyone, > > I'm trying to get as25 working with my project in FlashDevelop (compiling > with MTASC). With one test class it works fine and I get full output like > this: > > AsUnit 2.5 by Luke Bayes and Ali Mills > ..F > > Time: 0.065 > There was 1 failure: > 0) com.saffroninter.lms.LMSAPITest.testMyCode() > assertTrue.message: This will fail! > > FAILURES!!! > Tests run: 2, Failures: 1, Errors: 0 > > However, if I add a second test class like this to my AllTests.as in the > package... > > addTest(new mypackage.MyClassOne()); > addTest(new mypackage.MyClassTwo ()); > > ..all I get is this in the output: > > AsUnit 2.5 by Luke Bayes and Ali Mills > ..F > > If you have seen this before or have any idea what I'm doing wrong, please > can you point me in the right direction. > > Many thanks, > > Tom > |