mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-09 15:27:38 +00:00
ICU-10069 improve error messages"
X-SVN-Rev: 33839
This commit is contained in:
parent
2c6bc98b14
commit
2116c12c20
1 changed files with 16 additions and 2 deletions
|
@ -2662,8 +2662,22 @@ void NumberFormatTest::expectParseCurrency(const NumberFormat &fmt, const UChar*
|
|||
return;
|
||||
}
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
assertTrue("amount", amount == currencyAmount->getNumber().getDouble(status));
|
||||
assertEquals("currency", currency, currencyAmount->getISOCurrency());
|
||||
|
||||
char theInfo[100];
|
||||
sprintf(theInfo, "For locale %s, string \"%s\", currency ",
|
||||
fmt.getLocale(ULOC_ACTUAL_LOCALE, status).getBaseName(),
|
||||
text);
|
||||
u_austrcpy(theInfo+uprv_strlen(theInfo), currency);
|
||||
|
||||
char theOperation[100];
|
||||
|
||||
uprv_strcpy(theOperation, theInfo);
|
||||
uprv_strcat(theOperation, ", check amount:");
|
||||
assertTrue(theOperation, amount == currencyAmount->getNumber().getDouble(status));
|
||||
|
||||
uprv_strcpy(theOperation, theInfo);
|
||||
uprv_strcat(theOperation, ", check currency:");
|
||||
assertEquals(theOperation, currency, currencyAmount->getISOCurrency());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue