ICU-10069 improve error messages"

X-SVN-Rev: 33839
This commit is contained in:
Steven R. Loomis 2013-06-20 22:20:51 +00:00
parent 2c6bc98b14
commit 2116c12c20

View file

@ -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());
}