mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-96 fixed French errors, detect discrepancies in compare and sortkey results
X-SVN-Rev: 3126
This commit is contained in:
parent
e2db5e18bc
commit
3c933af3d1
2 changed files with 39 additions and 27 deletions
|
@ -92,6 +92,18 @@ void reportCResult( const UChar source[], const UChar target[],
|
|||
austrdup(sResult), austrdup(sExpect) );
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (keyResult != compareResult)
|
||||
{
|
||||
|
||||
appendCompareResult(keyResult, sResult);
|
||||
appendCompareResult(compareResult, sExpect);
|
||||
|
||||
log_err("difference between sortkey and compare result for (%s , %s) Keys: %s compare %s\n", austrdup(source), austrdup(target),
|
||||
austrdup(sResult), austrdup(sExpect) );
|
||||
|
||||
|
||||
}
|
||||
free(sExpect);
|
||||
free(sResult);
|
||||
|
|
|
@ -73,39 +73,39 @@ const static UCollationResult results[] =
|
|||
UCOL_GREATER,
|
||||
UCOL_GREATER,
|
||||
UCOL_GREATER,
|
||||
UCOL_GREATER,
|
||||
UCOL_GREATER
|
||||
UCOL_LESS,
|
||||
UCOL_LESS
|
||||
};
|
||||
|
||||
/* 0x0300 is grave, 0x0301 is acute*/
|
||||
/* the order of elements in this array must be different than the order in CollationEnglishTest*/
|
||||
const static UChar testAcute[][MAX_TOKEN_LEN] =
|
||||
{
|
||||
{0x0065/*'e'*/, 0x0065/*'e'*/, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0065/*'e'*/, 0x0301, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0065/*'e'*/, 0x0300, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0300, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0300, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0300, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0300, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
|
||||
{0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000}
|
||||
/*00*/ {0x0065/*'e'*/, 0x0065/*'e'*/, 0x0000},
|
||||
/*01*/ {0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0000},
|
||||
/*02*/ {0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0000},
|
||||
/*03*/ {0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0000},
|
||||
/*04*/ {0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0000},
|
||||
/*05*/ {0x0065/*'e'*/, 0x0065/*'e'*/, 0x0301, 0x0000},
|
||||
/*06*/ {0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0000},
|
||||
/*07*/ {0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0000},
|
||||
/*08*/ {0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0000},
|
||||
/*09*/ {0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0000},
|
||||
/*0a*/ {0x0065/*'e'*/, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
|
||||
/*0b*/ {0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
|
||||
/*0c*/ {0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
|
||||
/*0d*/ {0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
|
||||
/*0e*/ {0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0300, 0x0301, 0x0000},
|
||||
/*0f*/ {0x0065/*'e'*/, 0x0065/*'e'*/, 0x0300, 0x0000},
|
||||
/*10*/ {0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0300, 0x0000},
|
||||
/*11*/ {0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0300, 0x0000},
|
||||
/*12*/ {0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0300, 0x0000},
|
||||
/*13*/ {0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0300, 0x0000},
|
||||
/*14*/ {0x0065/*'e'*/, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
|
||||
/*15*/ {0x0065/*'e'*/, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
|
||||
/*16*/ {0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
|
||||
/*17*/ {0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
|
||||
/*18*/ {0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000}
|
||||
};
|
||||
|
||||
const static UChar testBugs[][MAX_TOKEN_LEN] =
|
||||
|
|
Loading…
Add table
Reference in a new issue