|
From: David H. <wa...@us...> - 2004-11-02 18:07:33
|
On Tue, Nov 02, 2004 at 03:00:28PM +0000, David Holroyd wrote:
> In an attempt to get things working, I had tried switcing to AS2Unit,
> but its set of assert*() functions, and its documentation, are both a bit
> lacking, so I think I'll install (this) asunit again.
Ok, things are working for my now. A couple of observations about the
API:
- It lacks a fail() method. I added this to Assert.as:
public static function fail(msg:Object):Void {
addTestResult(String(msg), "fail", false);
}
- Tests are allowed to continue after an assertion fails. I'm used to
JUnit practice of aborting a given test when a problem is noticed -- the
assertXxx() method throws a special exception that the framework then
catches, before continuing to the next test in the TestCase.
- The assertXxx() methods can often construct resonable error messages
if none are given; i.e. msg = "Expected undefined; <"+assertion+">".
Will you accept a patch to add this?
ta,
dave
|