Last active
December 14, 2015 15:38
-
-
Save MindScriptAct/5108870 to your computer and use it in GitHub Desktop.
FlashDevelop snippet - asinc test for AsUnit.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private var $$(feature)_asincFunction:Function; | |
[Test(async)] | |
public function $$(unit)_$$(feature)_$$(outcome=ok,fail)():void { | |
$$(feature)_asincFunction = AsyncUtil.asyncHandler(this, $$(feature)_callBack, [], 1000, $$(feature)_fail); | |
$$(feature)_asincFunction(); | |
} | |
private function $$(feature)_callBack():void { | |
// do asserts... | |
} | |
private function $$(feature)_fail():void { | |
Assert.fail("$$(feature) failed."); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment