Search in sources :

Example 6 with ScientificNumberFormatter

use of android.icu.text.ScientificNumberFormatter in project j2objc by google.

the class ScientificNumberFormatterTest method TestFixedDecimalMarkup.

@Test
public void TestFixedDecimalMarkup() {
    DecimalFormat decfmt = (DecimalFormat) NumberFormat.getInstance(ULocale.ENGLISH);
    ScientificNumberFormatter fmt = ScientificNumberFormatter.getMarkupInstance(decfmt, "<sup>", "</sup>");
    assertEquals("", "123,456", fmt.format(123456.0));
}
Also used : DecimalFormat(android.icu.text.DecimalFormat) ScientificNumberFormatter(android.icu.text.ScientificNumberFormatter) Test(org.junit.Test)

Aggregations

ScientificNumberFormatter (android.icu.text.ScientificNumberFormatter)6 Test (org.junit.Test)6 DecimalFormat (android.icu.text.DecimalFormat)4 ULocale (android.icu.util.ULocale)1