ICU-4350 Update cintltst with UCA 4.1 changes

X-SVN-Rev: 17623
This commit is contained in:
Vladimir Weinstein 2005-05-19 06:45:10 +00:00
parent 32354b1c86
commit e8b9a1e903
2 changed files with 14 additions and 10 deletions

View File

@ -280,7 +280,7 @@ void TestProperty()
ICU 2.6 currVersionArray = {0x21, 0x40, 0x03, 0x03};
*/
UVersionInfo currVersionArray = {0x29, 0x80, 0x00, 0x04};
UVersionInfo currUCAVersionArray = {4, 0, 0, 0};
UVersionInfo currUCAVersionArray = {4, 1, 0, 0};
UVersionInfo versionArray = {0, 0, 0, 0};
UVersionInfo versionUCAArray = {0, 0, 0, 0};
@ -763,10 +763,12 @@ void TestSortKey()
{
uint8_t *sortk1 = NULL, *sortk2 = NULL, *sortk3 = NULL, *sortkEmpty = NULL;
uint8_t sortk2_compat[] = {
/* 2.6.1 key */
0x26, 0x28, 0x2A, 0x2C, 0x26, 0x01,
0x09, 0x01, 0x09, 0x01, 0x25, 0x01,
0x92, 0x93, 0x94, 0x95, 0x92, 0x00
/* 3.4 key, UCA 4.1 */
0x28, 0x2a, 0x2c, 0x2e, 0x28, 0x01,
0x09, 0x01, 0x09, 0x01, 0x27, 0x01,
0x92, 0x93, 0x94, 0x95, 0x92, 0x00
/* 2.6.1 key */
/* 0x26, 0x28, 0x2A, 0x2C, 0x26, 0x01, 0x09, 0x01, 0x09, 0x01, 0x25, 0x01, 0x92, 0x93, 0x94, 0x95, 0x92, 0x00 */
/* 2.2 key */
/*0x1D, 0x1F, 0x21, 0x23, 0x1D, 0x01, 0x09, 0x01, 0x09, 0x01, 0x1C, 0x01, 0x92, 0x93, 0x94, 0x95, 0x92, 0x00*/
/* 2.0 key */
@ -1731,7 +1733,7 @@ static void TestShortString(void)
int32_t expectedOffset;
uint32_t expectedIdentifier;
} testCases[] = {
{"LDE_RDE_KPHONEBOOK_T0041_ZLATN","B2600_KPHONEBOOK_LDE", "de@collation=phonebook", U_USING_FALLBACK_WARNING, 0, 0 },
{"LDE_RDE_KPHONEBOOK_T0041_ZLATN","B2800_KPHONEBOOK_LDE", "de@collation=phonebook", U_USING_FALLBACK_WARNING, 0, 0 },
{"LEN_RUS_NO_AS_S4","AS_LEN_NO_S4", NULL, U_USING_FALLBACK_WARNING, 0, 0 },
{"LDE_VPHONEBOOK_EO_SI","EO_KPHONEBOOK_LDE_SI", "de@collation=phonebook", U_ZERO_ERROR, 0, 0 },
{"LDE_Kphonebook","KPHONEBOOK_LDE", "de@collation=phonebook", U_ZERO_ERROR, 0, 0 },

View File

@ -3560,7 +3560,7 @@ static void TestRuleOptions(void) {
},
{ "&[last variable]<a &[before 3][last variable]<<<c<<<b ",
{ "c", "b", "\\uD800\\uDD33", "a", "\\u02d0" }, 5
{ "c", "b", "\\uD802\\uDE47", "a", "\\u02d0" }, 5
},
{ "&[first regular]<a"
@ -3570,7 +3570,7 @@ static void TestRuleOptions(void) {
{ "&[before 1][last regular]<b"
"&[last regular]<a",
{ "b", "\\uD800\\uDF9D", "a", "\\u4e00" }, 4
{ "b", "\\uD800\\uDFCF", "a", "\\u4e00" }, 4
},
{ "&[before 1][first implicit]<b"
@ -4637,7 +4637,9 @@ TestThaiSortKey(void)
UErrorCode status = U_ZERO_ERROR;
uint8_t key[256];
int32_t keyLen = 0;
uint8_t expectedKey[256] = { 0x01, 0xd9, 0xb2, 0x01, 0x05, 0x00 };
/* UCA 4.0 uint8_t expectedKey[256] = { 0x01, 0xd9, 0xb2, 0x01, 0x05, 0x00 }; */
/* UCA 4.1 moves Yammakan */
uint8_t expectedKey[256] = { 0x01, 0xdb, 0x3a, 0x01, 0x05, 0x00 };
UCollator *coll = ucol_open("th", &status);
if(U_FAILURE(status)) {
log_err("Could not open a collator, exiting (%s)\n", u_errorName(status));
@ -4645,7 +4647,7 @@ TestThaiSortKey(void)
keyLen = ucol_getSortKey(coll, &yamakan, 1, key, 256);
if(strcmp((char *)key, (char *)expectedKey)) {
log_err("Yamakan key is different from ICU 262!\n");
log_err("Yammakan key is different from ICU 34!\n");
}
ucol_close(coll);