mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-05 21:45:37 +00:00
ICU-9927 Skip RamsRulesTest for collations with import; better error reporting in Test{CE/SortKey}Validity; current coll data for bs, bs_Cyrl, fa_AF
X-SVN-Rev: 33264
This commit is contained in:
parent
16ecba2369
commit
d3bb555dba
5 changed files with 41 additions and 10 deletions
|
@ -10,6 +10,15 @@
|
|||
* ICU <specials> source: <path>/xml/collation/bs.xml
|
||||
*/
|
||||
bs{
|
||||
Version{"2.0.73.72"}
|
||||
collations:alias{"hr/collations"}
|
||||
Version{"2.0.81.36"}
|
||||
collations{
|
||||
search{
|
||||
Sequence{"[import hr-u-co-search]"}
|
||||
Version{"23"}
|
||||
}
|
||||
standard{
|
||||
Sequence{"[import hr]"}
|
||||
Version{"23"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,5 +11,10 @@
|
|||
*/
|
||||
bs_Cyrl{
|
||||
Version{"2.0.73.72"}
|
||||
collations:alias{"sr/collations"}
|
||||
collations{
|
||||
standard{
|
||||
Sequence{"[import sr]"}
|
||||
Version{"23"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,11 @@
|
|||
* ICU <specials> source: <path>/xml/collation/fa_AF.xml
|
||||
*/
|
||||
fa_AF{
|
||||
Version{"2.0.41.26"}
|
||||
collations:alias{"ps/collations"}
|
||||
Version{"2.0.81.36"}
|
||||
collations{
|
||||
standard{
|
||||
Sequence{"[import ps]"}
|
||||
Version{"23"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************************
|
||||
* COPYRIGHT:
|
||||
* Copyright (c) 1997-2011, International Business Machines Corporation and
|
||||
* Copyright (c) 1997-2013, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
********************************************************************/
|
||||
/********************************************************************************
|
||||
|
@ -1775,6 +1775,7 @@ static void TestCEValidity()
|
|||
continue;
|
||||
}
|
||||
}
|
||||
status = U_ZERO_ERROR; // clear status from previous loop iteration
|
||||
|
||||
uprv_memset(&src, 0, sizeof(UColTokenParser));
|
||||
|
||||
|
@ -1782,7 +1783,7 @@ static void TestCEValidity()
|
|||
|
||||
coll = ucol_open(loc, &status);
|
||||
if (U_FAILURE(status)) {
|
||||
log_err("%s collator creation failed\n", loc);
|
||||
log_err("%s collator creation failed with status %s\n", loc, u_errorName(status));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1800,7 +1801,7 @@ static void TestCEValidity()
|
|||
|
||||
/* Note that as a result of tickets 7015 or 6912, ucol_tok_parseNextToken can cause the pointer to
|
||||
the rules copy in src.source to get reallocated, freeing the original pointer in rulesCopy */
|
||||
while ((current = ucol_tok_parseNextToken(&src, startOfRules, &parseError,&status)) != NULL) {
|
||||
while ((current = ucol_tok_parseNextToken(&src, startOfRules, &parseError,&status)) != NULL && U_SUCCESS(status)) {
|
||||
strength = src.parsedToken.strength;
|
||||
chOffset = src.parsedToken.charsOffset;
|
||||
chLen = src.parsedToken.charsLen;
|
||||
|
@ -1816,6 +1817,9 @@ static void TestCEValidity()
|
|||
codepoints[chLen] = 0;
|
||||
checkCEValidity(coll, codepoints, chLen);
|
||||
}
|
||||
if (U_FAILURE(status)) {
|
||||
log_err("%s collator, ucol_tok_parseNextToken failed with status %s\n", loc, u_errorName(status));
|
||||
}
|
||||
uprv_free(src.source);
|
||||
}
|
||||
|
||||
|
@ -1967,12 +1971,13 @@ static void TestSortKeyValidity(void)
|
|||
UColTokenParser src;
|
||||
uint32_t strength = 0;
|
||||
uint16_t specs = 0;
|
||||
status = U_ZERO_ERROR; // clear status from previous loop iteration
|
||||
|
||||
uprv_memset(&src, 0, sizeof(UColTokenParser));
|
||||
|
||||
coll = ucol_open(locale[count], &status);
|
||||
if (U_FAILURE(status)) {
|
||||
log_err("%s collator creation failed\n", locale[count]);
|
||||
log_err("%s collator creation failed with status %s\n", locale[count], u_errorName(status));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1990,7 +1995,7 @@ static void TestSortKeyValidity(void)
|
|||
|
||||
/* Note that as a result of tickets 7015 or 6912, ucol_tok_parseNextToken can cause the pointer to
|
||||
the rules copy in src.source to get reallocated, freeing the original pointer in rulesCopy */
|
||||
while ((current = ucol_tok_parseNextToken(&src, startOfRules,&parseError, &status)) != NULL) {
|
||||
while ((current = ucol_tok_parseNextToken(&src, startOfRules,&parseError, &status)) != NULL && U_SUCCESS(status)) {
|
||||
strength = src.parsedToken.strength;
|
||||
chOffset = src.parsedToken.charsOffset;
|
||||
chLen = src.parsedToken.charsLen;
|
||||
|
@ -2010,6 +2015,9 @@ static void TestSortKeyValidity(void)
|
|||
}
|
||||
checkSortKeyValidity(coll, codepoints, chLen);
|
||||
}
|
||||
if (U_FAILURE(status)) {
|
||||
log_err("%s collator, ucol_tok_parseNextToken failed with status %s\n", locale[count], u_errorName(status));
|
||||
}
|
||||
uprv_free(src.source);
|
||||
}
|
||||
|
||||
|
|
|
@ -1398,7 +1398,10 @@ static void RamsRulesTest(void) {
|
|||
continue;
|
||||
}
|
||||
if (uprv_strcmp("bn", locName)==0 ||
|
||||
uprv_strcmp("bs", locName)==0 || /* Add due to import per cldrbug 5647 */
|
||||
uprv_strcmp("bs_Cyrl", locName)==0 || /* Add due to import per cldrbug 5647 */
|
||||
uprv_strcmp("en_US_POSIX", locName)==0 ||
|
||||
uprv_strcmp("fa_AF", locName)==0 || /* Add due to import per cldrbug 5647 */
|
||||
uprv_strcmp("he", locName)==0 || /* Add due to new tailoring of \u05F3 vs \u0027 per cldrbug 5576 */
|
||||
uprv_strcmp("he_IL", locName)==0 || /* Add due to new tailoring of \u05F3 vs \u0027 per cldrbug 5576 */
|
||||
uprv_strcmp("km", locName)==0 ||
|
||||
|
@ -1406,6 +1409,7 @@ static void RamsRulesTest(void) {
|
|||
uprv_strcmp("my", locName)==0 ||
|
||||
uprv_strcmp("si", locName)==0 ||
|
||||
uprv_strcmp("si_LK", locName)==0 ||
|
||||
uprv_strcmp("sr_Latn", locName)==0 || /* Add due to import per cldrbug 5647 */
|
||||
uprv_strcmp("th", locName)==0 ||
|
||||
uprv_strcmp("th_TH", locName)==0 ||
|
||||
uprv_strcmp("zh", locName)==0 ||
|
||||
|
|
Loading…
Add table
Reference in a new issue