db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Bouschen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JDO-206) JDOQL test NotEquals comparing floating point numbers
Date Sun, 18 Dec 2005 20:39:35 GMT
     [ http://issues.apache.org/jira/browse/JDO-206?page=all ]

Michael Bouschen updated JDO-206:
---------------------------------

    Attachment: JDO-206.patch

I agree with Erik that there is a problem with derby since it converts the float value to
a double when storing. However, this test class is not intended to test storing of float or
double values, instead it should test the != operator in JDOQL queries. Thus I propose to
use a different float value that does not change when converting it to a double, e.g. -234.25
instead of -234.23. 

Attached you find a patch for review including the above change. It also added a localSetUp
method adding a tearDown class to the test classes Equality, NotEquals, LessThan, LessThanOrEqual,
GreaterThan, and GreaterThanOrEqual. All these tests did not clean up after test execution.
Please note, if you run these tests after applying the patch, then they will most probably
fail, because a previous run w/o the patch did not clean up the database. You nee to run the
tests again.
 

> JDOQL test NotEquals comparing floating point numbers
> -----------------------------------------------------
>
>          Key: JDO-206
>          URL: http://issues.apache.org/jira/browse/JDO-206
>      Project: JDO
>         Type: Bug
>   Components: tck20
>     Reporter: Andy Jefferson
>     Assignee: Michael Bouschen
>  Attachments: JDO-206.patch
>
> The current TCK test (carried over from JDO 1.0) for NotEquals, uses != operator on floating
point numbers. This is not a good practice, and is unreliable. Its probably the case that
the Equals test uses == on the same content, which also is not a good idea (as noted in the
latest spec). These tests need reviewing and a reliable alternate strategy adopting

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message