ICU-3812 don't crash when snext() returns NULL

X-SVN-Rev: 15737
This commit is contained in:
Alan Liu 2004-06-04 23:37:30 +00:00
parent ea38c32dc8
commit b0337f001c

View File

@ -205,8 +205,10 @@ void TransliteratorTest::TestInstantiation() {
UnicodeString name;
for (int32_t i=0; i<n; ++i) {
const UnicodeString& id = *avail->snext(ec);
assertSuccess("snext()", ec);
assertTrue("snext()!=NULL", (&id)!=NULL, TRUE);
if (!assertSuccess("snext()", ec) ||
!assertTrue("snext()!=NULL", (&id)!=NULL, TRUE)) {
break;
}
UnicodeString id2 = Transliterator::getAvailableID(i);
if (id.length() < 1) {
errln(UnicodeString("FAIL: getAvailableID(") +