This is the mail archive of the mauve-patches@sources.redhat.com mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Fwd: Re: javax.swing.SwingUtilities - new tests]


Sorry, forgot to include the list on my last reply.
--- Begin Message ---
On Wed, 2004-11-17 at 23:27, Stephen Crawley wrote:
> david.gilbert@object-refinery.com said:

> > Perhaps someone can think of a more compact way to test for an
> > expected exception... 
> 
> I cannot.  
> 
> My two cents worth is that if a testcase is explicitly catching
> unexpected exceptions it should at least tell us what exception it
> has caught! For example:
> 
> ....
> }
> catch (Exception e)  {
>   harness.check(false, "Caught an unexpected exception"); 
>   harness.debug(e);
> }

In a perfect world, yes.  But where do you draw the line between (a) the
test output describing everything about the test and (b) finding that
out by looking at the source code when a test actually fails.  I settle
for (b) if it reduces the pain of writing tests (which it does for me).

Regards,
Dave.

--- End Message ---

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]