From ef91d1dbd60e9a245b121e3d31c8aad0332a64c7 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 22 Aug 2014 15:42:49 -0700 Subject: Fix the Turkish Lira test. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Turkey switched from "123,45 TL" to "₺123,45" in 2012. It's taken a while for our font to catch up, but now it has. (cherry-pick of c56ec7b571ba6cc02ae9c1b5a790b7141b4de394.) Bug: 16727554 Change-Id: I3c80f95d5f620c905247c9f227171717180106b4 --- .../harmony/tests/java/text/Support_DecimalFormat.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'harmony-tests/src/test/java') 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 9a55bc3..b8d7519 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 @@ -76,11 +76,13 @@ public class Support_DecimalFormat extends Support_Format { // test currency instance with TR Locale number = new Double(350.76); format = (DecimalFormat) NumberFormat.getCurrencyInstance(new Locale("tr", "TR")); - text = "350,76" + "\u00a0" + "TL"; - t_FormatWithField(22, format, number, text, NumberFormat.Field.INTEGER, 0, 3); - t_FormatWithField(22, format, number, text, NumberFormat.Field.DECIMAL_SEPARATOR, 3, 4); - t_FormatWithField(22, format, number, text, NumberFormat.Field.FRACTION, 4, 6); - t_FormatWithField(23, format, number, text, NumberFormat.Field.CURRENCY, 7, 9); + // Turkey either uses "123,45 TL" or "₺123,45"; google3 uses the former because most + // platforms' fonts don't include U+20BA TURKISH LIRA SIGN. http://b/16727554. + text = "₺350,76"; + t_FormatWithField(23, format, number, text, NumberFormat.Field.CURRENCY, 0, 1); + t_FormatWithField(22, format, number, text, NumberFormat.Field.INTEGER, 1, 4); + t_FormatWithField(22, format, number, text, NumberFormat.Field.DECIMAL_SEPARATOR, 4, 5); + t_FormatWithField(22, format, number, text, NumberFormat.Field.FRACTION, 5, 7); // test fields that are not included in the formatted text t_FormatWithField(25, format, number, text, NumberFormat.Field.GROUPING_SEPARATOR, 0, 0); -- cgit v1.1