mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-11025 Add Test11025_CurrencyPadding()
X-SVN-Rev: 41348
This commit is contained in:
parent
16472502b5
commit
e53fdc14a6
2 changed files with 15 additions and 0 deletions
|
@ -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(Test11025_CurrencyPadding);
|
||||
TESTCASE_AUTO(Test11648_ExpDecFormatMalPattern);
|
||||
TESTCASE_AUTO(Test11649_DecFmtCurrencies);
|
||||
TESTCASE_AUTO_END;
|
||||
|
@ -9398,6 +9399,19 @@ void NumberFormatTest::Test13056_GroupingSize() {
|
|||
assertEquals("Secondary should remember explicit setting and return 3", 3, df.getSecondaryGroupingSize());
|
||||
}
|
||||
|
||||
|
||||
void NumberFormatTest::Test11025_CurrencyPadding() {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
UnicodeString pattern(u"¤¤ **####0.00");
|
||||
DecimalFormatSymbols sym(Locale::getFrance(), status);
|
||||
if (!assertSuccess("", status)) return;
|
||||
DecimalFormat fmt(pattern, sym, status);
|
||||
if (!assertSuccess("", status)) return;
|
||||
UnicodeString result;
|
||||
fmt.format(433.0, result);
|
||||
assertEquals("Number should be padded to 11 characters", "EUR *433,00", result);
|
||||
}
|
||||
|
||||
void NumberFormatTest::Test11648_ExpDecFormatMalPattern() {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
||||
|
|
|
@ -237,6 +237,7 @@ class NumberFormatTest: public CalendarTimeZoneTest {
|
|||
void Test11645_ApplyPatternEquality();
|
||||
void Test12567();
|
||||
void Test13056_GroupingSize();
|
||||
void Test11025_CurrencyPadding();
|
||||
void Test11648_ExpDecFormatMalPattern();
|
||||
void Test11649_DecFmtCurrencies();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue