|
AsyncTest
IntroductionAsync tests are very easy to implement with utest. Create a delegate using Assert.createAsync, than dispatch it on a timer or timed event. Detailsimport utest.Assert;
import utest.Runner;
import utest.ui.Report;
class Test {
public static function main() {
var runner = new Runner();
runner.addCase(new Test());
Report.create(runner);
runner.run();
}
public function new();
public function testAsync() {
var async = Assert.createAsync(function() Assert.isTrue(true));
haxe.Timer.delay(async, 50);
}
}Compile using the same build file used in Basic Tutorial. |
► Sign in to add a comment