ICU-1977 Add more tests

X-SVN-Rev: 10316
This commit is contained in:
George Rhoten 2002-11-21 19:24:25 +00:00
parent d2a41f067d
commit b164ce1d52
2 changed files with 14 additions and 0 deletions

View file

@ -190,10 +190,22 @@ static void TestConvert()
else {
const char *string = NULL;
int32_t len = 0;
int32_t count1 = 0;
int32_t count2 = 0;
allNamesCount = uenum_count(allNamesEnum, &err);
while ((string = uenum_next(allNamesEnum, &len, &err))) {
count1++;
log_verbose("read \"%s\", length %i\n", string, len);
}
err = U_ZERO_ERROR;
uenum_reset(allNamesEnum, &err);
while ((string = uenum_next(allNamesEnum, &len, &err))) {
count2++;
log_verbose("read \"%s\", length %i\n", string, len);
}
if (count1 != count2) {
log_err("FAILURE! uenum_reset(allNamesEnum, &err); doesn't work\n");
}
}
uenum_close(allNamesEnum);
err = U_ZERO_ERROR;

View file

@ -147,6 +147,8 @@ static void TestCanonicalName()
dotestconv("cp1208", "", "UTF-8") && /* default name due to ordering */
dotestconv("cp65001", "", "UTF-8") && /* non-default name due to ordering */
dotestconv("ISO-2022", "MIME", "ISO_2022") &&/* default name */
dotestconv("Shift_JIS", "MIME", "ibm-943_P14A-2000") &&/* ambiguous alias */
dotestconv("Shift_JIS", "", "ibm-943_P130-2000") &&/* ambiguous alias */
dotestconv("crazy", "MIME", NULL) &&
dotestconv("ASCII", "crazy", NULL))
{