public inbox for mauve-discuss@sourceware.org
 help / color / mirror / Atom feed
* bug in DoubleTest, FloatTest
@ 2002-11-05  6:59 Dalibor Topic
  2002-11-05  7:20 ` Eric Blake
  2002-11-05  8:06 ` Tom Tromey
  0 siblings, 2 replies; 4+ messages in thread
From: Dalibor Topic @ 2002-11-05  6:59 UTC (permalink / raw)
  To: mauve-discuss

Hi,

I think I've found a bug in mauve tests for
java.lang.Double and java.lang.Float. the
shortbytevalue test nr. 5 assumes that the truncated
byte value of a Float/Double created with 400.35 is
equal to 127, when it is -112 on both kaffe and
JDK1.3.1.

double d = 400.35;
System.out.println((byte) d);

also prints out -112 on both environments.

I can send you a patch for
gnu/testlet/java/lang/Double/DoubleTest.java and
gnu/testlet/java/lang/Double/FloatTest.java, if you
need one. It should be trivial fix.

best regards,

dalibor topic

__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug in DoubleTest, FloatTest
  2002-11-05  6:59 bug in DoubleTest, FloatTest Dalibor Topic
@ 2002-11-05  7:20 ` Eric Blake
  2002-11-05  7:24   ` Dalibor Topic
  2002-11-05  8:06 ` Tom Tromey
  1 sibling, 1 reply; 4+ messages in thread
From: Eric Blake @ 2002-11-05  7:20 UTC (permalink / raw)
  To: Dalibor Topic; +Cc: mauve-discuss

This very bug was raised about a month ago. I'm surprised it hasn't been 
fixed yet, but go ahead and fix it.

Dalibor Topic wrote:
> Hi,
> 
> I think I've found a bug in mauve tests for
> java.lang.Double and java.lang.Float. the
> shortbytevalue test nr. 5 assumes that the truncated
> byte value of a Float/Double created with 400.35 is
> equal to 127, when it is -112 on both kaffe and
> JDK1.3.1.
> 
> double d = 400.35;
> System.out.println((byte) d);
> 
> also prints out -112 on both environments.
> 
> I can send you a patch for
> gnu/testlet/java/lang/Double/DoubleTest.java and
> gnu/testlet/java/lang/Double/FloatTest.java, if you
> need one. It should be trivial fix.
> 
> best regards,
> 
> dalibor topic
> 
> __________________________________________________
> Do you Yahoo!?
> HotJobs - Search new jobs daily now
> http://hotjobs.yahoo.com/
> 


-- 
This signature intentionally left boring.

Eric Blake             ebb9@email.byu.edu
   BYU student, free software programmer


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug in DoubleTest, FloatTest
  2002-11-05  7:20 ` Eric Blake
@ 2002-11-05  7:24   ` Dalibor Topic
  0 siblings, 0 replies; 4+ messages in thread
From: Dalibor Topic @ 2002-11-05  7:24 UTC (permalink / raw)
  To: Eric Blake; +Cc: mauve-discuss

A quick look at the change log ... yes, it might be
fixed. I need to update my sources.

2002-09-26  Stephen Crawley <crawley@dstc.edu.au>     
 
        * gnu/testlet/java/lang/Double/DoubleTest.java
(test_shortbyteValue):
        Reverted test for truncation in byteValue() to
match JDK 1.4 spec
        and implementation.  [This was incorrectly
'fixed' on 2002-06-13.]
        * gnu/testlet/java/lang/Float/FloatTest.java
(test_shortbyteValue):
        ditto

--- Eric Blake <ebb9@email.byu.edu> wrote:
> This very bug was raised about a month ago. I'm
> surprised it hasn't been 
> fixed yet, but go ahead and fix it.
> 
> Dalibor Topic wrote:
> > Hi,
> > 
> > I think I've found a bug in mauve tests for
> > java.lang.Double and java.lang.Float. the
> > shortbytevalue test nr. 5 assumes that the
> truncated
> > byte value of a Float/Double created with 400.35
> is
> > equal to 127, when it is -112 on both kaffe and
> > JDK1.3.1.
> > 
> > double d = 400.35;
> > System.out.println((byte) d);
> > 
> > also prints out -112 on both environments.
> > 
> > I can send you a patch for
> > gnu/testlet/java/lang/Double/DoubleTest.java and
> > gnu/testlet/java/lang/Double/FloatTest.java, if
> you
> > need one. It should be trivial fix.
> > 
> > best regards,
> > 
> > dalibor topic
> > 
> > __________________________________________________
> > Do you Yahoo!?
> > HotJobs - Search new jobs daily now
> > http://hotjobs.yahoo.com/
> > 
> 
> 
> -- 
> This signature intentionally left boring.
> 
> Eric Blake             ebb9@email.byu.edu
>    BYU student, free software programmer
> 
> 


__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug in DoubleTest, FloatTest
  2002-11-05  6:59 bug in DoubleTest, FloatTest Dalibor Topic
  2002-11-05  7:20 ` Eric Blake
@ 2002-11-05  8:06 ` Tom Tromey
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2002-11-05  8:06 UTC (permalink / raw)
  To: Dalibor Topic; +Cc: mauve-discuss

>>>>> "Dalibor" == Dalibor Topic <robilad@yahoo.com> writes:

Dalibor> I think I've found a bug in mauve tests for java.lang.Double
Dalibor> and java.lang.Float. the shortbytevalue test nr. 5 assumes
Dalibor> that the truncated byte value of a Float/Double created with
Dalibor> 400.35 is equal to 127, when it is -112 on both kaffe and
Dalibor> JDK1.3.1.

I think this bug is already fixed in cvs.
I looked and now the code reads `... != (byte) 400'.
This isn't ideal -- checking the correct value would be better.

Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-11-05 16:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-05  6:59 bug in DoubleTest, FloatTest Dalibor Topic
2002-11-05  7:20 ` Eric Blake
2002-11-05  7:24   ` Dalibor Topic
2002-11-05  8:06 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).