summaryrefslogtreecommitdiffstats
path: root/harmony-tests/src/test
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2014-09-25 15:48:56 +0100
committerNeil Fuller <nfuller@google.com>2014-09-29 17:37:56 +0100
commit7e9ba6479f0f350be6f3aef91b9ffdb7c0a46995 (patch)
tree653b9e99000a7a261c5b87e08d5834aa0558bbb6 /harmony-tests/src/test
parent93ad3c2aba58918769a99b1fcf842fc92b473511 (diff)
downloadlibcore-7e9ba6479f0f350be6f3aef91b9ffdb7c0a46995.zip
libcore-7e9ba6479f0f350be6f3aef91b9ffdb7c0a46995.tar.gz
libcore-7e9ba6479f0f350be6f3aef91b9ffdb7c0a46995.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 (cherry picked from commit d90019a2d2e56ef56b412f7c11264148b075f4ba) Change-Id: I050473f19646942a8ba4bde4b2c2847f4b516f7b
Diffstat (limited to 'harmony-tests/src/test')
-rw-r--r--harmony-tests/src/test/java/org/apache/harmony/tests/java/text/Support_DecimalFormat.java18
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));