|
From: David H. <da...@us...> - 2004-11-04 10:48:18
|
On Wed, Nov 03, 2004 at 01:39:13PM -0800, Luke Bayes wrote:
> So - Regarding the addition of a fail method on the Assert Class, I'm
> adding it right now and it will be implemented in the next release.
Great!
> Regarding the "Tests are allowed to continue after an assertion fails" issue:
> I actually like to get all of my failures at once, but I concede that
> it's probably easiest to accept a failure, fix it, and get the next
> one. Maybe you could add the requested functionality (stop on
> failure), but implement it with a Flag that will let users turn it on
> and off?
>
> I want to make sure that if you're going to submit code fixes, please
> make them Flash 6 player compatible - meaning no "Try-Catch" as it's
> critical that our Unit Test framework remain compatible with that
> player environment for the time being. At least until a more robust
> version is released on Pocket PCs.
Ah. Exception handling was exactly the mechanism I was thinking of.
That makes things a bit more difficult.
I guess it might still be possible to optionally implement this
mechanism based on the presense of the Error class, or something.
Does ASUnit already have a mechanism for dealing with exceptions (per
the runProtected() method of junit.framework.TestResult)?
Oh, just to clarify: I'm not suggesting that all tests halt on the first
error, just that a given testFoo() method will exit on the first
assertion that fails.
> Regarding the construction of a more legible error message in the
> Assertion class. If you're interested in revising the way the UI
> outputs errors, I would be very interested in making that more like
> JUnit.
I started looking at this, and noticed that chevrons ('<', '>') cause
problems when output appears in the ASUnit panel. I guess the panel is
displaying HTML, so messages need the appropriate encoding before
appearing there. Assert shouldn't care where its output appears, so where
should HTML-encoding happen?
ta,
dave
PS Thanks for all the work you guys have put into this project!
|