Question
assert() API?
Is there an API to force an assert?
Specifically:
assert("Something went wrong");
I am doing some async tests, and in one case I am testing if an IO_ErrorEvent occurs. If it does, I want to do an assert:
private function onConnectError(e:IOErrorEvent):void
{
assert("Connection Failed : " + e.text, false);
}
Right now I have to do:
private function onConnectError(e:IOErrorEvent):void
{
assertTrue("Connection Failed : " + e.text, false);
}
Looking through the APIs i did not see an assert() api.
I would be happy to add one myself.
mike chambers
Specifically:
assert("Something went wrong");
I am doing some async tests, and in one case I am testing if an IO_ErrorEvent occurs. If it does, I want to do an assert:
private function onConnectError(e:IOErrorEvent):void
{
assert("Connection Failed : " + e.text, false);
}
Right now I have to do:
private function onConnectError(e:IOErrorEvent):void
{
assertTrue("Connection Failed : " + e.text, false);
}
Looking through the APIs i did not see an assert() api.
I would be happy to add one myself.
mike chambers
