Hi,all:
   I find one testcase of DoubleTest fails on RI. After digging into it, I
find that it is due to the different behaviors of Double.toString between
Harmony and RI.
   Here is a testcase:
   public class DoubleTest extends TestCase {
   public void test_toString(){
       String actual = Double.toString(1e23D);
       String expected = "9.999999999999999E22";
       assertEquals(expected,actual);
   }
}
  Because of the limitation of double/float's precision, different numbers
are mapped to the same double value. So I think it is the different
implementation that lead to the different toString() result which represents
different original number before mapping. Thus it can be regarded as a
non-bug difference between RI and Harmony and I recommend to remove the
testcase.

Result
RI:  Pass
HR:  Fail


--
Leo Li
China Software Development Lab, IBM

Reply via email to