mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-4434 Test for Yamakkan fix.
X-SVN-Rev: 17322
This commit is contained in:
parent
82690d6ba8
commit
d7b0c07adf
1 changed files with 18 additions and 0 deletions
|
@ -4630,6 +4630,23 @@ static void TestTailorNULL( void ) {
|
|||
ucol_close(coll);
|
||||
}
|
||||
|
||||
static void
|
||||
TestThaiSortKey(void)
|
||||
{
|
||||
UChar yamakan = 0x0E4E;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
UCollator *coll = ucol_open("th", &status);
|
||||
uint8_t key[256];
|
||||
int32_t keyLen = ucol_getSortKey(coll, &yamakan, 1, key, 256);
|
||||
uint8_t expectedKey[256] = { 0x01, 0xd9, 0xb2, 0x01, 0x05, 0x00 };
|
||||
|
||||
if(strcmp((char *)key, (char *)expectedKey)) {
|
||||
log_err("Yamakan key is different from ICU 262!\n");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#define TEST(x) addTest(root, &x, "tscoll/cmsccoll/" # x)
|
||||
|
||||
void addMiscCollTest(TestNode** root)
|
||||
|
@ -4693,6 +4710,7 @@ void addMiscCollTest(TestNode** root)
|
|||
TEST(TestBeforeTightening);
|
||||
/*TEST(TestMoreBefore);*/
|
||||
TEST(TestTailorNULL);
|
||||
TEST(TestThaiSortKey);
|
||||
}
|
||||
|
||||
#endif /* #if !UCONFIG_NO_COLLATION */
|
||||
|
|
Loading…
Add table
Reference in a new issue