Skip to content

Instantly share code, notes, and snippets.

@MindScriptAct
Last active December 14, 2015 15:38
Show Gist options
  • Save MindScriptAct/5108870 to your computer and use it in GitHub Desktop.
Save MindScriptAct/5108870 to your computer and use it in GitHub Desktop.
FlashDevelop snippet - asinc test for AsUnit.
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