]> granicus.if.org Git - icu/commitdiff
ICU-20056 Adding test for minFrac with maxSig
authorShane Carr <sffc@google.com>
Thu, 2 Aug 2018 00:16:29 +0000 (17:16 -0700)
committerShane Carr <shane@unicode.org>
Thu, 27 Sep 2018 21:27:37 +0000 (14:27 -0700)
icu4j/main/tests/core/src/com/ibm/icu/dev/test/number/NumberFormatterApiTest.java

index 5b84d77f15d1b312ab678312338368f6b5cba13a..761b4e11eef98fb611b33f978cc1c45159ab55e9 100644 (file)
@@ -983,6 +983,21 @@ public class NumberFormatterApiTest {
                 "0.01",
                 "0.00");
 
+        assertFormatDescending(
+                "FracSig minFrac maxSig",
+                ".0+/@#",
+                NumberFormatter.with().precision(Precision.minFraction(1).withMaxDigits(2)),
+                ULocale.ENGLISH,
+                "88,000.0",
+                "8,800.0",
+                "880.0",
+                "88.0",
+                "8.8",
+                "0.88",
+                "0.088",
+                "0.0088",
+                "0.0");
+
         assertFormatSingle(
                 "FracSig with trailing zeros A",
                 ".00/@@@+",