mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 10:17:23 +00:00
ICU-1245 updated test for changes in quaternary generation
X-SVN-Rev: 5994
This commit is contained in:
parent
af539d41bb
commit
f71f7eb0e8
3 changed files with 8 additions and 6 deletions
|
@ -580,7 +580,7 @@ void TestSortKey()
|
|||
uint8_t *sortk1 = NULL, *sortk2 = NULL, *sortk3 = NULL;
|
||||
uint8_t sortk2_compat[] = {
|
||||
/* 2.0 key */
|
||||
0x19, 0x1B, 0x1D, 0x1F, 0x19, 0x01, 0x09, 0x01, 0x09, 0x01, 0x92, 0x93, 0x94, 0x95, 0x92, 0x00
|
||||
0x19, 0x1B, 0x1D, 0x1F, 0x19, 0x01, 0x09, 0x01, 0x09, 0x01, 0x18, 0x01, 0x92, 0x93, 0x94, 0x95, 0x92, 0x00
|
||||
/* 1.8.1 key.*/
|
||||
/*0x19, 0x1B, 0x1D, 0x1F, 0x19, 0x01, 0x0A, 0x01, 0x0A, 0x01, 0x92, 0x93, 0x94, 0x95, 0x92, 0x00*/
|
||||
/*this is a 1.8 sortkey */
|
||||
|
|
|
@ -1793,9 +1793,10 @@ static UBool checkSortKeyValidity(UCollator *coll,
|
|||
int length)
|
||||
{
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
UCollationStrength strength[4] = {UCOL_PRIMARY, UCOL_SECONDARY,
|
||||
UCOL_TERTIARY, UCOL_IDENTICAL};
|
||||
int strengthlen = 4;
|
||||
UCollationStrength strength[5] = {UCOL_PRIMARY, UCOL_SECONDARY,
|
||||
UCOL_TERTIARY, UCOL_QUATERNARY,
|
||||
UCOL_IDENTICAL};
|
||||
int strengthlen = 5;
|
||||
int index = 0;
|
||||
int caselevel = 0;
|
||||
|
||||
|
@ -1816,7 +1817,7 @@ static UBool checkSortKeyValidity(UCollator *coll,
|
|||
ucol_setStrength(coll, strength[index]);
|
||||
sklen = ucol_getSortKey(coll, codepoints, length, sortkey, 128);
|
||||
while (sortkey[count] != 0) {
|
||||
if (sortkey[count] == 2 || (sortkey[count] == 3 && count01 > 0 && index != 3)) {
|
||||
if (sortkey[count] == 2 || (sortkey[count] == 3 && count01 > 0 && index != 4)) {
|
||||
printSortKeyError(codepoints, length, sortkey, sklen);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -940,7 +940,8 @@ void CollationAPITest::TestSortKey()
|
|||
uint8_t key2compat[] = {
|
||||
/* 2.0 key */
|
||||
0x19, 0x1B, 0x1D, 0x1F, 0x19,
|
||||
0x01, 0x09, 0x01, 0x09, 0x01,
|
||||
0x01, 0x09, 0x01, 0x09, 0x01,
|
||||
0x18, 0x01,
|
||||
0x92, 0x93, 0x94, 0x95, 0x92,
|
||||
0x00
|
||||
/* 1.8.1 key.*/
|
||||
|
|
Loading…
Add table
Reference in a new issue