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]

Re: SpinnerListModel tests


Hi,

On Tue, 2004-10-12 at 22:26, Andrew John Hughes wrote:
> Attached is a patch to add tests for the javax.swing.SpinnerListModel
> class.  Okay to commit?

Thanks! These look fine.
One style point. I like to write checks that check whether an exception
is actually thrown as:

        boolean some_exception_thrown = false;
        try
          {
            some_operation_that_might_throw_some_exception();
          }
        catch (SomeException some_exception)
          {
            some_exception_thrown = true;
          }
        harness.check(some_exception);
        
That way you get a a test result (PASS) even when the exception is
thrown (when running with -verbose or -resultsonly). And not just a
(FAIL) test result if nothing is thrown.

Do you have CVS access already? Or would you like me to apply this?

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


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