Java Code Examples for android.icu.text.NumberFormat#getMaximumIntegerDigits()
The following examples show how to use
android.icu.text.NumberFormat#getMaximumIntegerDigits() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestMessageFormat.java From j2objc with Apache License 2.0 | 5 votes |
public void TestDateFormatHashCode() { DateFormat testDF = DateFormat.getDateInstance(DateFormat.DEFAULT, ULocale.GERMAN); NumberFormat testNF = testDF.getNumberFormat(); int expectedResult = testNF.getMaximumIntegerDigits() * 37 + testNF.getMaximumFractionDigits(); int actualHashResult = testDF.hashCode(); assertEquals("DateFormat hashCode", expectedResult, actualHashResult); }
Example 2
Source File: NumberRegressionTests.java From j2objc with Apache License 2.0 | 5 votes |
/** * DecimalFormat.setMaximumIntegerDigits() works incorrectly. */ @Test public void Test4110936() { NumberFormat nf = NumberFormat.getInstance(); nf.setMaximumIntegerDigits(128); logln("setMaximumIntegerDigits(128)"); if (nf.getMaximumIntegerDigits() != 128) errln("getMaximumIntegerDigits() returns " + nf.getMaximumIntegerDigits()); }