diff options
author | Neil Fuller <nfuller@google.com> | 2014-09-25 15:48:56 +0100 |
---|---|---|
committer | Neil Fuller <nfuller@google.com> | 2014-09-25 15:57:12 +0100 |
commit | d90019a2d2e56ef56b412f7c11264148b075f4ba (patch) | |
tree | 19898db175a9d381d3ef953d9506df0a22cedcea /harmony-tests | |
parent | c5152705f26bc21f27d09107c645f47e730e8762 (diff) | |
download | libcore-d90019a2d2e56ef56b412f7c11264148b075f4ba.zip libcore-d90019a2d2e56ef56b412f7c11264148b075f4ba.tar.gz libcore-d90019a2d2e56ef56b412f7c11264148b075f4ba.tar.bz2 |
Fix test_formatToCharacterIterator_original
Two issues fixed:
1) The negative currency cases appear to have never been correct. Almost
certainly they would have had the sign bit as the first element in the
format.
2) The recent change in Android to support the Turkish currency format
broke the TR tests (previously obscured by 1). Bug 16727554 /
commits ef91d1dbd60e9a245b121e3d31c8aad0332a64c7 and
44b0a574cbc3a54e421f5c79020cc59fbd4f34b9.
Bug: 12781028
Change-Id: I6187f7f1feed915b1d8fd5fb398caef7998bfa04
Diffstat (limited to 'harmony-tests')
-rw-r--r-- | harmony-tests/src/test/java/org/apache/harmony/tests/java/text/Support_DecimalFormat.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/Support_DecimalFormat.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/Support_DecimalFormat.java index b8d7519..0c6a824 100644 --- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/Support_DecimalFormat.java +++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/Support_DecimalFormat.java @@ -154,19 +154,20 @@ public class Support_DecimalFormat extends Support_Format { private static Vector<FieldContainer> getPositiveCurrencyVectorTR() { Vector<FieldContainer> v = new Vector<FieldContainer>(); - v.add(new FieldContainer(0, 3, NumberFormat.Field.INTEGER)); - v.add(new FieldContainer(3, 4, NumberFormat.Field.DECIMAL_SEPARATOR)); - v.add(new FieldContainer(4, 6, NumberFormat.Field.FRACTION)); - v.add(new FieldContainer(7, 9, NumberFormat.Field.CURRENCY)); + v.add(new FieldContainer(0, 1, NumberFormat.Field.CURRENCY)); + v.add(new FieldContainer(1, 4, NumberFormat.Field.INTEGER)); + v.add(new FieldContainer(4, 5, NumberFormat.Field.DECIMAL_SEPARATOR)); + v.add(new FieldContainer(5, 7, NumberFormat.Field.FRACTION)); return v; } private static Vector<FieldContainer> getNegativeCurrencyVectorTR() { Vector<FieldContainer> v = new Vector<FieldContainer>(); - v.add(new FieldContainer(1, 4, NumberFormat.Field.INTEGER)); - v.add(new FieldContainer(4, 5, NumberFormat.Field.DECIMAL_SEPARATOR)); - v.add(new FieldContainer(5, 7, NumberFormat.Field.FRACTION)); - v.add(new FieldContainer(8, 10, NumberFormat.Field.CURRENCY)); + v.add(new FieldContainer(0, 1, NumberFormat.Field.SIGN)); + v.add(new FieldContainer(1, 2, NumberFormat.Field.CURRENCY)); + v.add(new FieldContainer(2, 5, NumberFormat.Field.INTEGER)); + v.add(new FieldContainer(5, 6, NumberFormat.Field.DECIMAL_SEPARATOR)); + v.add(new FieldContainer(6, 8, NumberFormat.Field.FRACTION)); return v; } @@ -181,6 +182,7 @@ public class Support_DecimalFormat extends Support_Format { private static Vector<FieldContainer> getNegativeCurrencyVectorUS() { Vector<FieldContainer> v = new Vector<FieldContainer>(); + v.add(new FieldContainer(0, 1, NumberFormat.Field.SIGN)); v.add(new FieldContainer(1, 2, NumberFormat.Field.CURRENCY)); v.add(new FieldContainer(2, 5, NumberFormat.Field.INTEGER)); v.add(new FieldContainer(5, 6, NumberFormat.Field.DECIMAL_SEPARATOR)); |