From 0cc2fd091ff39110d0b4a98c923427078d783789 Mon Sep 17 00:00:00 2001 From: Peter Edberg Date: Tue, 19 Oct 2010 03:31:50 +0000 Subject: [PATCH] ICU-8046 CLDR 1.9 integration pass 1, update tests X-SVN-Rev: 28867 --- icu4c/source/test/cintltst/capitst.c | 40 +++++++++++++------------- icu4c/source/test/cintltst/cfrtst.c | 14 ++++----- icu4c/source/test/cintltst/cg7coll.c | 4 +-- icu4c/source/test/cintltst/cldrtest.c | 2 +- icu4c/source/test/cintltst/cmsccoll.c | 23 +++++++++------ icu4c/source/test/cintltst/creststn.c | 5 +++- icu4c/source/test/intltest/apicoll.cpp | 10 +++---- icu4c/source/test/intltest/frcoll.cpp | 4 +-- icu4c/source/test/intltest/g7coll.cpp | 4 +-- icu4c/source/test/intltest/itrbnf.cpp | 26 ++++++++--------- icu4c/source/test/intltest/regcoll.cpp | 12 ++++---- icu4c/source/test/intltest/ssearch.cpp | 6 ++-- icu4c/source/test/intltest/svccoll.cpp | 12 ++++---- icu4c/source/test/testdata/root.txt | 4 +-- 14 files changed, 87 insertions(+), 79 deletions(-) diff --git a/icu4c/source/test/cintltst/capitst.c b/icu4c/source/test/cintltst/capitst.c index 414539cd65a..26bb6816037 100644 --- a/icu4c/source/test/cintltst/capitst.c +++ b/icu4c/source/test/cintltst/capitst.c @@ -1343,7 +1343,7 @@ void TestGetLocale() { { "sr_RS", "sr_Cyrl_RS", "sr" }, { "sh_YU", "sr_Latn_RS", "hr" }, /* this used to be sh, but now sh collation aliases hr */ { "en_BE_FOO", "en_BE", "root" }, - { "fr_FR_NONEXISTANT", "fr_FR", "fr" } + { "de_DE_NONEXISTANT", "de_DE", "de" } }; /* test opening collators for different locales */ @@ -1961,7 +1961,7 @@ static void TestShortString(void) {"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 }, {"Xqde_DE@collation=phonebookq_S3_EX","KPHONEBOOK_LDE", "de@collation=phonebook", U_USING_FALLBACK_WARNING, 0, 0 }, - {"LFR_FO", "LFR", NULL, U_ZERO_ERROR, 0, 0 }, + {"LFR_FO", "FO_LROOT", NULL, U_USING_DEFAULT_WARNING, 0, 0 }, {"SO_LX_AS", "", NULL, U_ILLEGAL_ARGUMENT_ERROR, 8, 0 }, {"S3_ASS_MMM", "", NULL, U_ILLEGAL_ARGUMENT_ERROR, 5, 0 } }; @@ -2262,26 +2262,26 @@ static void TestDefaultKeyword(void) { static void TestGetKeywordValuesForLocale(void) { #define PREFERRED_SIZE 16 -#define MAX_NUMBER_OF_KEYWORDS 7 +#define MAX_NUMBER_OF_KEYWORDS 8 const char *PREFERRED[PREFERRED_SIZE][MAX_NUMBER_OF_KEYWORDS+1] = { - { "und", "standard", "search", NULL, NULL, NULL, NULL, NULL }, - { "en_US", "standard", "search", NULL, NULL, NULL, NULL, NULL }, - { "en_029", "standard", "search", NULL, NULL, NULL, NULL, NULL }, - { "de_DE", "standard", "phonebook", "search", NULL, NULL, NULL, NULL }, - { "de_Latn_DE", "standard", "phonebook", "search", NULL, NULL, NULL, NULL }, - { "zh", "pinyin", "big5han", "gb2312han", "standard", "stroke", "unihan", "search" }, - { "zh_Hans", "pinyin", "big5han", "gb2312han", "standard", "stroke", "unihan", "search" }, - { "zh_CN", "pinyin", "big5han", "gb2312han", "standard", "stroke", "unihan", "search" }, - { "zh_Hant", "stroke", "big5han", "gb2312han", "pinyin", "standard", "unihan", "search" }, - { "zh_TW", "stroke", "big5han", "gb2312han", "pinyin", "standard", "unihan", "search" }, - { "zh__PINYIN", "pinyin", "big5han", "gb2312han", "standard", "stroke", "unihan", "search" }, - { "es_ES", "standard", "traditional", "search", NULL, NULL, NULL, NULL }, - { "es__TRADITIONAL","traditional", "standard", "search", NULL, NULL, NULL, NULL }, - { "und@collation=phonebook", "standard", "search", NULL, NULL, NULL, NULL, NULL }, - { "de_DE@collation=big5han", "standard", "phonebook", "search", NULL, NULL, NULL, NULL }, - { "zzz@collation=xxx", "standard", "search", NULL, NULL, NULL, NULL, NULL } + { "und", "standard", "ducet", "search", NULL, NULL, NULL, NULL, NULL }, + { "en_US", "standard", "ducet", "search", NULL, NULL, NULL, NULL, NULL }, + { "en_029", "standard", "ducet", "search", NULL, NULL, NULL, NULL, NULL }, + { "de_DE", "standard", "phonebook", "search", "ducet", NULL, NULL, NULL, NULL }, + { "de_Latn_DE", "standard", "phonebook", "search", "ducet", NULL, NULL, NULL, NULL }, + { "zh", "pinyin", "big5han", "gb2312han", "standard", "stroke", "unihan", "ducet", "search" }, + { "zh_Hans", "pinyin", "big5han", "gb2312han", "standard", "stroke", "unihan", "ducet", "search" }, + { "zh_CN", "pinyin", "big5han", "gb2312han", "standard", "stroke", "unihan", "ducet", "search" }, + { "zh_Hant", "stroke", "big5han", "gb2312han", "pinyin", "standard", "unihan", "ducet", "search" }, + { "zh_TW", "stroke", "big5han", "gb2312han", "pinyin", "standard", "unihan", "ducet", "search" }, + { "zh__PINYIN", "pinyin", "big5han", "gb2312han", "standard", "stroke", "unihan", "ducet", "search" }, + { "es_ES", "standard", "search", "traditional", "ducet", NULL, NULL, NULL, NULL }, + { "es__TRADITIONAL","traditional", "search", "standard", "ducet", NULL, NULL, NULL, NULL }, + { "und@collation=phonebook", "standard", "ducet", "search", NULL, NULL, NULL, NULL, NULL }, + { "de_DE@collation=big5han", "standard", "phonebook", "search", "ducet", NULL, NULL, NULL, NULL }, + { "zzz@collation=xxx", "standard", "ducet", "search", NULL, NULL, NULL, NULL, NULL } }; - const int32_t expectedLength[PREFERRED_SIZE] = { 2, 2, 2, 3, 3, 7, 7, 7, 7, 7, 7, 3, 3, 2, 3, 2 }; + const int32_t expectedLength[PREFERRED_SIZE] = { 3, 3, 3, 4, 4, 8, 8, 8, 8, 8, 8, 4, 4, 3, 4, 3 }; UErrorCode status = U_ZERO_ERROR; UEnumeration *keywordValues = NULL; diff --git a/icu4c/source/test/cintltst/cfrtst.c b/icu4c/source/test/cintltst/cfrtst.c index 0093bc85519..c739412baf8 100644 --- a/icu4c/source/test/cintltst/cfrtst.c +++ b/icu4c/source/test/cintltst/cfrtst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2009, International Business Machines Corporation and + * Copyright (c) 1997-2010, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -145,7 +145,7 @@ static void TestTertiary( ) int32_t i; UErrorCode status = U_ZERO_ERROR; - myCollation = ucol_open("fr_FR", &status); + myCollation = ucol_open("fr_CA", &status); if(U_FAILURE(status) || !myCollation){ log_err_status(status, "ERROR: in creation of rule based collator: %s\n", myErrorName(status)); return; @@ -156,7 +156,7 @@ static void TestTertiary( ) log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status)); return; } - log_verbose("Testing French Collation with Tertiary strength\n"); + log_verbose("Testing fr_CA Collation with Tertiary strength\n"); ucol_setStrength(myCollation, UCOL_QUATERNARY); for (i = 0; i < 12 ; i++) { @@ -170,7 +170,7 @@ static void TestSecondary() int32_t i,j, testAcuteSize; UCollationResult expected=UCOL_EQUAL; UErrorCode status = U_ZERO_ERROR; - myCollation = ucol_open("fr_FR", &status); + myCollation = ucol_open("fr_CA", &status); if(U_FAILURE(status)){ log_err_status(status, "ERROR: in creation of rule based collator: %s\n", myErrorName(status)); return; @@ -180,7 +180,7 @@ static void TestSecondary() log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status)); return; } - log_verbose("Testing French Collation with Secondary strength\n"); + log_verbose("Testing fr_CA Collation with Secondary strength\n"); /*test acute and grave ordering (compare to french collation)*/ testAcuteSize = sizeof(testAcute) / sizeof(testAcute[0]); for (i = 0; i < testAcuteSize; i++) @@ -200,12 +200,12 @@ static void TestExtra() { int32_t i, j; UErrorCode status = U_ZERO_ERROR; - myCollation = ucol_open("fr_FR", &status); + myCollation = ucol_open("fr_CA", &status); if(U_FAILURE(status)){ log_err_status(status, "ERROR: in creation of rule based collator: %s\n", myErrorName(status)); return; } - log_verbose("Testing French Collation extra with secondary strength\n"); + log_verbose("Testing fr_CA Collation extra with secondary strength\n"); ucol_setStrength(myCollation, UCOL_TERTIARY); for (i = 0; i < 9 ; i++) { diff --git a/icu4c/source/test/cintltst/cg7coll.c b/icu4c/source/test/cintltst/cg7coll.c index 9ad3e9fb488..4eae9735bf6 100644 --- a/icu4c/source/test/cintltst/cg7coll.c +++ b/icu4c/source/test/cintltst/cg7coll.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2009, International Business Machines Corporation and + * Copyright (c) 1997-2010, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************** @@ -108,7 +108,7 @@ const static int32_t results[TESTLOCALES][TOTALTESTSET] = { { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* en_US */ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* en_GB */ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* en_CA */ - { 12, 13, 9, 0, 14, 1, 11, 3, 2, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* fr_FR */ + { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* fr_FR */ { 12, 13, 9, 0, 14, 1, 11, 3, 2, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* fr_CA */ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* de_DE */ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* it_IT */ diff --git a/icu4c/source/test/cintltst/cldrtest.c b/icu4c/source/test/cintltst/cldrtest.c index fe9d89751af..c9eee0166b4 100644 --- a/icu4c/source/test/cintltst/cldrtest.c +++ b/icu4c/source/test/cintltst/cldrtest.c @@ -1007,7 +1007,7 @@ static void VerifyTranslation(void) { if (U_FAILURE(errorCode)) { log_err("error uloc_getDisplayCountry returned %s\n", u_errorName(errorCode)); } - else { + else if (uprv_strstr(currLoc, "ti_") != currLoc) { /* TODO: restore DisplayCountry test for ti_* when cldrbug 3058 is fixed) */ strIdx = findStringSetMismatch(currLoc, langBuffer, langSize, exemplarCharacters, exemplarLen, FALSE); if (strIdx >= 0) { log_err("getDisplayCountry(%s) at index %d returned characters not in the exemplar characters.\n", diff --git a/icu4c/source/test/cintltst/cmsccoll.c b/icu4c/source/test/cintltst/cmsccoll.c index 8da3997ec0f..a7dee573c1f 100644 --- a/icu4c/source/test/cintltst/cmsccoll.c +++ b/icu4c/source/test/cintltst/cmsccoll.c @@ -1390,13 +1390,18 @@ static void RamsRulesTest(void) { log_verbose("Don't know how to test Phonebook because the reset is on an expanding character\n"); continue; } - if (uprv_strcmp("km", locName)==0 || + if (uprv_strcmp("bn", locName)==0 || + uprv_strcmp("en_US_POSIX", locName)==0 || + uprv_strcmp("km", locName)==0 || uprv_strcmp("km_KH", locName)==0 || uprv_strcmp("si", locName)==0 || uprv_strcmp("si_LK", locName)==0 || uprv_strcmp("zh", locName)==0 || - uprv_strcmp("zh_Hant", locName)==0 ) { - continue; /* TODO: enable these locale tests after trac#6040 is fixed. */ + uprv_strcmp("zh_Hant", locName)==0 + ) { + log_verbose("Don't know how to test %s. " + "TODO: Fix ticket #6040 and reenable RamsRulesTest for this locale.\n"); + continue; } log_verbose("Testing locale %s\n", locName); coll = ucol_open(locName, &status); @@ -4490,19 +4495,19 @@ ucol_getFunctionalEquivalent(char* result, int32_t resultCapacity, UErrorCode* status); } */ - n = ucol_getFunctionalEquivalent(loc, sizeof(loc), "collation", "fr", + n = ucol_getFunctionalEquivalent(loc, sizeof(loc), "collation", "de", &isAvailable, &ec); if (assertSuccess("getFunctionalEquivalent", &ec)) { - assertEquals("getFunctionalEquivalent(fr)", "fr", loc); - assertTrue("getFunctionalEquivalent(fr).isAvailable==TRUE", + assertEquals("getFunctionalEquivalent(de)", "de", loc); + assertTrue("getFunctionalEquivalent(de).isAvailable==TRUE", isAvailable == TRUE); } - n = ucol_getFunctionalEquivalent(loc, sizeof(loc), "collation", "fr_FR", + n = ucol_getFunctionalEquivalent(loc, sizeof(loc), "collation", "de_DE", &isAvailable, &ec); if (assertSuccess("getFunctionalEquivalent", &ec)) { - assertEquals("getFunctionalEquivalent(fr_FR)", "fr", loc); - assertTrue("getFunctionalEquivalent(fr_FR).isAvailable==TRUE", + assertEquals("getFunctionalEquivalent(de_DE)", "de", loc); + assertTrue("getFunctionalEquivalent(de_DE).isAvailable==TRUE", isAvailable == TRUE); } } diff --git a/icu4c/source/test/cintltst/creststn.c b/icu4c/source/test/cintltst/creststn.c index 5d714bbfd76..c682c61a2a1 100644 --- a/icu4c/source/test/cintltst/creststn.c +++ b/icu4c/source/test/cintltst/creststn.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2009, International Business Machines Corporation and + * Copyright (c) 1997-2010, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /******************************************************************************* @@ -280,11 +280,14 @@ static void TestErrorCodes(void) { checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status); /* we look up the resource which is aliased and at our level */ + /* TODO: restore the following test when cldrbug 3058: is fixed */ +#if 0 if(U_SUCCESS(status) && r != NULL) { status = U_USING_DEFAULT_WARNING; r2 = ures_getByKey(r, "Countries", r2, &status); checkStatus(__LINE__, U_USING_DEFAULT_WARNING, status); } +#endif ures_close(r); status = U_USING_FALLBACK_WARNING; diff --git a/icu4c/source/test/intltest/apicoll.cpp b/icu4c/source/test/intltest/apicoll.cpp index d3cf9e2924d..41a7ff1742b 100644 --- a/icu4c/source/test/intltest/apicoll.cpp +++ b/icu4c/source/test/intltest/apicoll.cpp @@ -239,10 +239,10 @@ CollationAPITest::TestProperty(/* char* par */) doAssert(((RuleBasedCollator *)col)->getRules() == ((RuleBasedCollator *)junk)->getRules(), "The default collation should be returned."); - Collator *frCol = Collator::createInstance(Locale::getFrance(), success); + Collator *frCol = Collator::createInstance(Locale::getCanadaFrench(), success); if (U_FAILURE(success)) { - errln("Creating French collator failed."); + errln("Creating fr_CA collator failed."); delete col; delete junk; return; @@ -250,11 +250,11 @@ CollationAPITest::TestProperty(/* char* par */) // If the default locale isn't French, the French and non-French collators // should be different - if (frCol->getLocale(ULOC_ACTUAL_LOCALE, success) != Locale::getFrench()) { - doAssert((*frCol != *junk), "The junk is the same as the French collator."); + if (frCol->getLocale(ULOC_ACTUAL_LOCALE, success) != Locale::getCanadaFrench()) { + doAssert((*frCol != *junk), "The junk is the same as the fr_CA collator."); } Collator *aFrCol = frCol->clone(); - doAssert((*frCol == *aFrCol), "The cloning of a French collator failed."); + doAssert((*frCol == *aFrCol), "The cloning of a fr_CA collator failed."); logln("Collator property test ended."); delete col; diff --git a/icu4c/source/test/intltest/frcoll.cpp b/icu4c/source/test/intltest/frcoll.cpp index a7b7fbd2478..6fa66628520 100644 --- a/icu4c/source/test/intltest/frcoll.cpp +++ b/icu4c/source/test/intltest/frcoll.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2009, International Business Machines Corporation and + * Copyright (c) 1997-2010, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -27,7 +27,7 @@ CollationFrenchTest::CollationFrenchTest() : myCollation(0) { UErrorCode status = U_ZERO_ERROR; - myCollation = Collator::createInstance(Locale::getFrance(), status); + myCollation = Collator::createInstance(Locale::getCanadaFrench(), status); if(!myCollation || U_FAILURE(status)) { errcheckln(status, __FILE__ "failed to create! err " + UnicodeString(u_errorName(status))); /* if it wasn't already: */ diff --git a/icu4c/source/test/intltest/g7coll.cpp b/icu4c/source/test/intltest/g7coll.cpp index 36b0e79f558..e49a6443759 100644 --- a/icu4c/source/test/intltest/g7coll.cpp +++ b/icu4c/source/test/intltest/g7coll.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2009, International Business Machines Corporation and + * Copyright (c) 1997-2010, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -60,7 +60,7 @@ static const int32_t results[G7CollationTest::TESTLOCALES][G7CollationTest::TOTA { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* en_US */ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* en_GB */ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* en_CA */ - { 12, 13, 9, 0, 14, 1, 11, 3, 2, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* fr_FR */ + { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* fr_FR */ { 12, 13, 9, 0, 14, 1, 11, 3, 2, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* fr_CA */ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* de_DE */ { 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* it_IT */ diff --git a/icu4c/source/test/intltest/itrbnf.cpp b/icu4c/source/test/intltest/itrbnf.cpp index 1f2dea8fb4e..6c04b1a92e8 100644 --- a/icu4c/source/test/intltest/itrbnf.cpp +++ b/icu4c/source/test/intltest/itrbnf.cpp @@ -1554,22 +1554,22 @@ IntlTestRBNF::TestSwedishSpellout() static const char* testDataDefault[][2] = { { "101", "ett\\u00adhundra\\u00adett" }, { "123", "ett\\u00adhundra\\u00adtjugo\\u00adtre" }, - { "1,001", "ettusen ett" }, - { "1,100", "ettusen ett\\u00adhundra" }, - { "1,101", "ettusen ett\\u00adhundra\\u00adett" }, - { "1,234", "ettusen tv\\u00e5\\u00adhundra\\u00adtrettio\\u00adfyra" }, + { "1,001", "et\\u00adtusen ett" }, + { "1,100", "et\\u00adtusen ett\\u00adhundra" }, + { "1,101", "et\\u00adtusen ett\\u00adhundra\\u00adett" }, + { "1,234", "et\\u00adtusen tv\\u00e5\\u00adhundra\\u00adtrettio\\u00adfyra" }, { "10,001", "tio\\u00adtusen ett" }, { "11,000", "elva\\u00adtusen" }, { "12,000", "tolv\\u00adtusen" }, - { "20,000", "tjugo-tusen" }, - { "21,000", "tjugo\\u00adett-tusen" }, - { "21,001", "tjugo\\u00adett-tusen ett" }, - { "200,000", "tv\\u00e5\\u00adhundra-tusen" }, - { "201,000", "tv\\u00e5\\u00adhundra\\u00adett-tusen" }, - { "200,200", "tv\\u00e5\\u00adhundra-tusen tv\\u00e5\\u00adhundra" }, + { "20,000", "tjugo\\u00adtusen" }, + { "21,000", "tjugo\\u00adet\\u00adtusen" }, + { "21,001", "tjugo\\u00adet\\u00adtusen ett" }, + { "200,000", "tv\\u00e5\\u00adhundra\\u00adtusen" }, + { "201,000", "tv\\u00e5\\u00adhundra\\u00adet\\u00adtusen" }, + { "200,200", "tv\\u00e5\\u00adhundra\\u00adtusen tv\\u00e5\\u00adhundra" }, { "2,002,000", "tv\\u00e5 miljoner tv\\u00e5\\u00adtusen" }, - { "12,345,678", "tolv miljoner tre\\u00adhundra\\u00adfyrtio\\u00adfem-tusen sex\\u00adhundra\\u00adsjuttio\\u00ad\\u00e5tta" }, - { "123,456.789", "ett\\u00adhundra\\u00adtjugo\\u00adtre-tusen fyra\\u00adhundra\\u00adfemtio\\u00adsex komma sju \\u00e5tta nio" }, + { "12,345,678", "tolv miljoner tre\\u00adhundra\\u00adfyrtio\\u00adfem\\u00adtusen sex\\u00adhundra\\u00adsjuttio\\u00ad\\u00e5tta" }, + { "123,456.789", "ett\\u00adhundra\\u00adtjugo\\u00adtre\\u00adtusen fyra\\u00adhundra\\u00adfemtio\\u00adsex komma sju \\u00e5tta nio" }, { "-12,345.678", "minus tolv\\u00adtusen tre\\u00adhundra\\u00adfyrtio\\u00adfem komma sex sju \\u00e5tta" }, { NULL, NULL } }; @@ -1596,7 +1596,7 @@ IntlTestRBNF::TestSwedishSpellout() static const char* testDataYear[][2] = { { "101", "ett\\u00adhundra\\u00adett" }, { "900", "nio\\u00adhundra" }, - { "1,001", "ettusen ett" }, + { "1,001", "et\\u00adtusen ett" }, { "1,100", "elva\\u00adhundra" }, { "1,101", "elva\\u00adhundra\\u00adett" }, { "1,234", "tolv\\u00adhundra\\u00adtrettio\\u00adfyra" }, diff --git a/icu4c/source/test/intltest/regcoll.cpp b/icu4c/source/test/intltest/regcoll.cpp index 2e077d35116..874ca8783c4 100644 --- a/icu4c/source/test/intltest/regcoll.cpp +++ b/icu4c/source/test/intltest/regcoll.cpp @@ -373,11 +373,11 @@ void CollationRegressionTest::Test4062418(/* char* par */) RuleBasedCollator *c = NULL; - c = (RuleBasedCollator *) Collator::createInstance(Locale::getFrance(), status); + c = (RuleBasedCollator *) Collator::createInstance(Locale::getCanadaFrench(), status); if (c == NULL || U_FAILURE(status)) { - errln("Failed to create collator for Locale::getFrance()"); + errln("Failed to create collator for Locale::getCanadaFrench()"); delete c; return; } @@ -453,11 +453,11 @@ void CollationRegressionTest::Test4066696(/* char* par */) UErrorCode status = U_ZERO_ERROR; RuleBasedCollator *c = NULL; - c = (RuleBasedCollator *)Collator::createInstance(Locale::getFrance(), status); + c = (RuleBasedCollator *)Collator::createInstance(Locale::getCanadaFrench(), status); if (c == NULL || U_FAILURE(status)) { - errln("Failure creating collator for Locale::getFrance()"); + errln("Failure creating collator for Locale::getCanadaFrench()"); delete c; return; } @@ -840,12 +840,12 @@ void CollationRegressionTest::Test4132736(/* char* par */) Collator *c = NULL; - c = Collator::createInstance(Locale::getFrance(), status); + c = Collator::createInstance(Locale::getCanadaFrench(), status); c->setStrength(Collator::TERTIARY); if (c == NULL || U_FAILURE(status)) { - errln("Failed to create a collator for Locale::getFrance()"); + errln("Failed to create a collator for Locale::getCanadaFrench()"); delete c; return; } diff --git a/icu4c/source/test/intltest/ssearch.cpp b/icu4c/source/test/intltest/ssearch.cpp index 1be77391174..4035e761e65 100644 --- a/icu4c/source/test/intltest/ssearch.cpp +++ b/icu4c/source/test/intltest/ssearch.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** - * Copyright (C) 2005-2009, International Business Machines + * Copyright (C) 2005-2010, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** */ @@ -1230,7 +1230,7 @@ void SSearchTest::boyerMooreTest() "fuss", "ffuss", "fufuss", "fusfuss", "1fuss", "12fuss", "123fuss", "1234fuss", "fu\\u00DF", "1fu\\u00DF", "12fu\\u00DF", "123fu\\u00DF", "1234fu\\u00DF"}; int32_t start = -1, end = -1; - coll = ucol_openFromShortString("S1", FALSE, NULL, &status); + coll = ucol_openFromShortString("LEN_S1", FALSE, NULL, &status); if (U_FAILURE(status)) { errcheckln(status, "Could not open collator. - %s", u_errorName(status)); return; @@ -1378,7 +1378,7 @@ void SSearchTest::bmsTest() "fuss", "ffuss", "fufuss", "fusfuss", "1fuss", "12fuss", "123fuss", "1234fuss", "fu\\u00DF", "1fu\\u00DF", "12fu\\u00DF", "123fu\\u00DF", "1234fu\\u00DF"}; int32_t start = -1, end = -1; - coll = ucol_openFromShortString("S1", FALSE, NULL, &status); + coll = ucol_openFromShortString("LEN_S1", FALSE, NULL, &status); if (U_FAILURE(status)) { errcheckln(status, "Could not open collator. - %s", u_errorName(status)); return; diff --git a/icu4c/source/test/intltest/svccoll.cpp b/icu4c/source/test/intltest/svccoll.cpp index 4af395494f3..3f0d6cc8a52 100644 --- a/icu4c/source/test/intltest/svccoll.cpp +++ b/icu4c/source/test/intltest/svccoll.cpp @@ -573,19 +573,19 @@ void CollationServiceTest::TestSeparateTree() { UBool isAvailable; Locale equiv = Collator::getFunctionalEquivalent("collation", - Locale::createFromName("fr"), + Locale::createFromName("de"), isAvailable, ec); assertSuccess("getFunctionalEquivalent", ec); - assertEquals("getFunctionalEquivalent(fr)", "fr", equiv.getName()); - assertTrue("getFunctionalEquivalent(fr).isAvailable==TRUE", + assertEquals("getFunctionalEquivalent(de)", "de", equiv.getName()); + assertTrue("getFunctionalEquivalent(de).isAvailable==TRUE", isAvailable == TRUE); equiv = Collator::getFunctionalEquivalent("collation", - Locale::createFromName("fr_FR"), + Locale::createFromName("de_DE"), isAvailable, ec); assertSuccess("getFunctionalEquivalent", ec); - assertEquals("getFunctionalEquivalent(fr_FR)", "fr", equiv.getName()); - assertTrue("getFunctionalEquivalent(fr_FR).isAvailable==TRUE", + assertEquals("getFunctionalEquivalent(de_DE)", "de", equiv.getName()); + assertTrue("getFunctionalEquivalent(de_DE).isAvailable==TRUE", isAvailable == TRUE); } diff --git a/icu4c/source/test/testdata/root.txt b/icu4c/source/test/testdata/root.txt index 6527a46f03d..e9f4c0a2595 100644 --- a/icu4c/source/test/testdata/root.txt +++ b/icu4c/source/test/testdata/root.txt @@ -11,8 +11,8 @@ root { Version { 44.0 } - ExpectCLDRVersionAtLeast { 1.8 } // 'base' cldr version. Allow up to version =.=.* of this - CurrentCLDRVersion { 1.8.99.1 } // Current CLDR version as of the test update. Warn if not an exact match. + ExpectCLDRVersionAtLeast { 1.9 } // 'base' cldr version. Allow up to version =.=.* of this + CurrentCLDRVersion { 1.9 } // Current CLDR version as of the test update. Warn if not an exact match. ShortLanguage { xxx }