ICU-96 collators should explicitly set the desired strength

X-SVN-Rev: 3830
This commit is contained in:
Vladimir Weinstein 2001-02-28 20:02:57 +00:00
parent 759c68048a
commit 660ea2acee

View file

@ -182,7 +182,6 @@ static void TestTertiary( )
return;
}
ucol_setAttribute(myCollation, UCOL_FRENCH_COLLATION, UCOL_ON, &status);
ucol_setAttribute(myCollation, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status);
if(U_FAILURE(status)){
log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
@ -194,7 +193,6 @@ static void TestTertiary( )
{
doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
}
ucol_setAttribute(myCollation, UCOL_FRENCH_COLLATION, UCOL_OFF, &status);
ucol_close(myCollation);
}
@ -208,7 +206,7 @@ static void TestSecondary()
log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
return;
}
ucol_setAttribute(myCollation, UCOL_FRENCH_COLLATION, UCOL_ON, &status);
ucol_setAttribute(myCollation, UCOL_STRENGTH, UCOL_SECONDARY, &status);
if(U_FAILURE(status)){
log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
return;
@ -226,7 +224,6 @@ static void TestSecondary()
doTest(myCollation, testAcute[i], testAcute[j], expected );
}
}
ucol_setAttribute(myCollation, UCOL_FRENCH_COLLATION, UCOL_OFF, &status);
ucol_close(myCollation);
}
@ -241,7 +238,6 @@ static void TestExtra()
}
log_verbose("Testing French Collation extra with secondary strength\n");
ucol_setStrength(myCollation, UCOL_TERTIARY);
ucol_setAttribute(myCollation, UCOL_FRENCH_COLLATION, UCOL_ON, &status);
for (i = 0; i < 9 ; i++)
{
for (j = i + 1; j < 10; j += 1)
@ -249,6 +245,5 @@ static void TestExtra()
doTest(myCollation, testBugs[i], testBugs[j], UCOL_LESS);
}
}
ucol_setAttribute(myCollation, UCOL_FRENCH_COLLATION, UCOL_OFF, &status);
ucol_close(myCollation);
}