ICU-96 fixed French errors, detect discrepancies in compare and sortkey results

X-SVN-Rev: 3126
This commit is contained in:
Vladimir Weinstein 2000-12-05 01:04:44 +00:00
parent e2db5e18bc
commit 3c933af3d1
2 changed files with 39 additions and 27 deletions

View file

@ -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);

View file

@ -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] =