ICU-4092 Improve code coverage

X-SVN-Rev: 16997
This commit is contained in:
George Rhoten 2004-12-22 06:36:14 +00:00
parent f9de880fb0
commit 6ee1d5489d
2 changed files with 18 additions and 0 deletions

View File

@ -1439,6 +1439,14 @@ static void TestKeywordVariants(void)
}
j++;
}
j = 0;
uenum_reset(keywords, &status);
while((keyword = uenum_next(keywords, &keywordLen, &status))) {
if(strcmp(keyword, testCases[i].expectedKeywords[j]) != 0) {
log_err("Expected to get keyword value %s, got %s\n", testCases[i].expectedKeywords[j], keyword);
}
j++;
}
}
uenum_close(keywords);
}

View File

@ -1636,6 +1636,16 @@ LocaleTest::TestKeywordVariants(void) {
}
}
}
keywords->reset(status); // Make sure that reset works.
for(j = 0;;) {
if((keyword = keywords->next(&keywordLen, status)) == NULL) {
break;
}
if(strcmp(keyword, testCases[i].expectedKeywords[j]) != 0) {
err("Expected to get keyword value %s, got %s\n", testCases[i].expectedKeywords[j], keyword);
}
j++;
}
}
delete keywords;
}