ICU-2412 don't crash when you cannot open UCA collator

X-SVN-Rev: 11689
This commit is contained in:
Vladimir Weinstein 2003-04-24 23:18:00 +00:00
parent 92652c8bb4
commit 38eff7394d

View File

@ -1027,7 +1027,11 @@ void MultithreadTest::TestCollators()
UCollator *coll = ucol_open("root", &status);
ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
if(U_FAILURE(status)) {
errln("Couldn't open UCA collator");
return;
}
ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
ucol_setAttribute(coll, UCOL_CASE_FIRST, UCOL_OFF, &status);
ucol_setAttribute(coll, UCOL_CASE_LEVEL, UCOL_OFF, &status);
ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_TERTIARY, &status);