ICU-11648 Re-add test for DecimalFormat::toPattern
X-SVN-Rev: 41346
This commit is contained in:
parent
614a3441db
commit
aeaeb8397b
@ -672,6 +672,7 @@ void NumberFormatTest::runIndexedTest( int32_t index, UBool exec, const char* &n
|
||||
TESTCASE_AUTO(Test11645_ApplyPatternEquality);
|
||||
TESTCASE_AUTO(Test12567);
|
||||
TESTCASE_AUTO(Test13056_GroupingSize);
|
||||
TESTCASE_AUTO(Test11648_ExpDecFormatMalPattern);
|
||||
TESTCASE_AUTO_END;
|
||||
}
|
||||
|
||||
@ -9396,4 +9397,17 @@ void NumberFormatTest::Test13056_GroupingSize() {
|
||||
assertEquals("Secondary should remember explicit setting and return 3", 3, df.getSecondaryGroupingSize());
|
||||
}
|
||||
|
||||
void NumberFormatTest::Test11648_ExpDecFormatMalPattern() {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
||||
DecimalFormat fmt("0.00", status);
|
||||
fmt.setScientificNotation(TRUE);
|
||||
UnicodeString pattern;
|
||||
|
||||
assertEquals("", "0.00E0", fmt.toPattern(pattern));
|
||||
|
||||
DecimalFormat fmt2(pattern, status);
|
||||
assertSuccess("", status);
|
||||
}
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
@ -237,6 +237,7 @@ class NumberFormatTest: public CalendarTimeZoneTest {
|
||||
void Test11645_ApplyPatternEquality();
|
||||
void Test12567();
|
||||
void Test13056_GroupingSize();
|
||||
void Test11648_ExpDecFormatMalPattern();
|
||||
|
||||
private:
|
||||
UBool testFormattableAsUFormattable(const char *file, int line, Formattable &f);
|
||||
|
Loading…
Reference in New Issue
Block a user