return {-2, -2, -3};
case UNUM_GROUPING_ON_ALIGNED:
return {-4, -4, 1};
- case UNUM_GROUPING_WESTERN:
+ case UNUM_GROUPING_THOUSANDS:
return {3, 3, 1};
default:
U_ASSERT(FALSE);
* <li>MIN2: 1234 and 12,34,567
* <li>AUTO: 1,234 and 12,34,567
* <li>ON_ALIGNED: 1,234 and 12,34,567
- * <li>WESTERN: 1,234 and 1,234,567
+ * <li>THOUSANDS: 1,234 and 1,234,567
* </ul>
*
* <p>
*
* @draft ICU 61
*/
- UNUM_GROUPING_WESTERN
+ UNUM_GROUPING_THOUSANDS
} UGroupingStrategy;
u"8.765",
u"0");
+ assertFormatDescendingBig(
+ u"Indic locale with THOUSANDS grouping",
+ NumberFormatter::with().grouping(UNUM_GROUPING_THOUSANDS),
+ Locale("en-IN"),
+ u"87,650,000",
+ u"8,765,000",
+ u"876,500",
+ u"87,650",
+ u"8,765",
+ u"876.5",
+ u"87.65",
+ u"8.765",
+ u"0");
+
// NOTE: Hungarian is interesting because it has minimumGroupingDigits=4 in locale data
// If this test breaks due to data changes, find another locale that has minimumGroupingDigits.
assertFormatDescendingBig(
return GROUPER_AUTO;
case ON_ALIGNED:
return GROUPER_ON_ALIGNED;
- case WESTERN:
+ case THOUSANDS:
return GROUPER_WESTERN;
default:
throw new AssertionError();
* <li>MIN2: 1234 and 12,34,567
* <li>AUTO: 1,234 and 12,34,567
* <li>ON_ALIGNED: 1,234 and 12,34,567
- * <li>WESTERN: 1,234 and 1,234,567
+ * <li>THOUSANDS: 1,234 and 1,234,567
* </ul>
*
* <p>
* @provisional This API might change or be removed in a future release.
* @see NumberFormatter
*/
- WESTERN
+ THOUSANDS
}
/**
"8.765",
"0");
+ assertFormatDescendingBig(
+ "Indic locale with THOUSANDS grouping",
+ "",
+ NumberFormatter.with().grouping(GroupingStrategy.THOUSANDS),
+ new ULocale("en-IN"),
+ "87,650,000",
+ "8,765,000",
+ "876,500",
+ "87,650",
+ "8,765",
+ "876.5",
+ "87.65",
+ "8.765",
+ "0");
+
// NOTE: Hungarian is interesting because it has minimumGroupingDigits=4 in locale data
// If this test breaks due to data changes, find another locale that has minimumGroupingDigits.
assertFormatDescendingBig(