This is the mail archive of the mauve-discuss@sourceware.org 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: misleading output "PASS: Error: ..."


Hi Edwin,

On Fri, 2006-01-20 at 20:59 +0100, Edwin Steiner wrote:
> During my work with tgolem I found many lines in the mauve output like
> this:
> 
> PASS: gnu.testlet.java.lang.Byte.ByteTest: Error: test_Basics failed - 1 (number 1)
> 
> They are produced by such code:
> 
>                 harness.check(!( Byte.MIN_VALUE != -128 ),
>                         "Error: test_Basics failed - 1" );
> 
> Would you accept patches turning this into
> 
>                 harness.check(!( Byte.MIN_VALUE != -128 ),
>                         "test_Basics - 1" );
> 
> ? (Only changing the string. Changing the double negation seems too
> error prone for the many cases I found.)

Yes please! I have found these message strings confusing myself in the
past. If you do decide to change the double negation then please rewrite
these as actual checks:

    harness.check(Byte.MIN_VALUE, -128, "test_Basics - 1" );

That way one sees the expected value if the the test would ever fail.
But just changing the message strings would already be an improvement.

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]