mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 22:44:49 +00:00
ICU-8022 #7316 is also reproduced with OpenJDK 6. Updated the test case to make it work on OpenJDK 6.
X-SVN-Rev: 29127
This commit is contained in:
parent
3357036c2e
commit
8566e3907d
1 changed files with 3 additions and 6 deletions
|
@ -4551,12 +4551,9 @@ public class DiagBigDecimal extends TestFmwk {
|
|||
d = d / ((double) 10);
|
||||
(new Test("val211")).ok = (com.ibm.icu.math.BigDecimal.valueOf(d).toString()).equals("0.09");
|
||||
d = d / ((double) 10);
|
||||
// The primitive double 0.009 is different in java 7. In java <= 6, there is a trailing 0 (e.g 0.0090).
|
||||
if (System.getProperty("java.version").charAt(2) >= '7') {
|
||||
(new Test("val212")).ok = (com.ibm.icu.math.BigDecimal.valueOf(d).toString()).equals("0.009");
|
||||
} else {
|
||||
(new Test("val212")).ok = (com.ibm.icu.math.BigDecimal.valueOf(d).toString()).equals("0.0090");
|
||||
}
|
||||
// The primitive double 0.009 is different in OpenJDK. In Oracle/IBM java <= 6, there is a trailing 0 (e.g 0.0090).
|
||||
String s = com.ibm.icu.math.BigDecimal.valueOf(d).toString();
|
||||
(new Test("val212")).ok = s.equals("0.0090") || s.equals("0.009");;
|
||||
d = d / ((double) 10);
|
||||
(new Test("val213")).ok = (com.ibm.icu.math.BigDecimal.valueOf(d).toString()).equals("9.0E-4");
|
||||
d = d / ((double) 10);
|
||||
|
|
Loading…
Add table
Reference in a new issue