• Home
  • Raw
  • Download

Lines Matching refs:ldn

95   LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getGermany());  in TestCreate()  local
96 ldn->localeDisplayName("de_DE", temp); in TestCreate()
97 delete ldn; in TestCreate()
103 LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getUS(), ULDN_DIALECT_NAMES); in TestCreateDialect() local
104 ldn->localeDisplayName("en_GB", temp); in TestCreateDialect()
105 delete ldn; in TestCreateDialect()
111 LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getUS()); in TestWithKeywordsAndEverything() local
115 ldn->localeDisplayName(locname, temp); in TestWithKeywordsAndEverything()
116 delete ldn; in TestWithKeywordsAndEverything()
122 LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getUS()); in TestCurrencyKeyword() local
125 ldn->localeDisplayName(locname, temp); in TestCurrencyKeyword()
126 delete ldn; in TestCurrencyKeyword()
132 LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getUS()); in TestUnknownCurrencyKeyword() local
135 ldn->localeDisplayName(locname, temp); in TestUnknownCurrencyKeyword()
136 delete ldn; in TestUnknownCurrencyKeyword()
142 LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getUS()); in TestUntranslatedKeywords() local
145 ldn->localeDisplayName(locname, temp); in TestUntranslatedKeywords()
146 delete ldn; in TestUntranslatedKeywords()
152 LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getUS()); in TestPrivateUse() local
155 ldn->localeDisplayName(locname, temp); in TestPrivateUse()
156 delete ldn; in TestPrivateUse()
164 …ULocaleDisplayNames *ldn = uldn_open(Locale::getGermany().getName(), ULDN_STANDARD_NAMES, &status); in TestUldnOpen() local
165 int32_t len = uldn_localeDisplayName(ldn, "de_DE", result, kMaxResultSize, &status); in TestUldnOpen()
166 uldn_close(ldn); in TestUldnOpen()
173 ldn = uldn_open(NULL, ULDN_STANDARD_NAMES, &status); in TestUldnOpen()
174 const char *locale = uldn_getLocale(ldn); in TestUldnOpen()
178 uldn_close(ldn); in TestUldnOpen()
186 ULocaleDisplayNames *ldn = uldn_open(Locale::getUS().getName(), ULDN_DIALECT_NAMES, &status); in TestUldnOpenDialect() local
187 int32_t len = uldn_localeDisplayName(ldn, "en_GB", result, kMaxResultSize, &status); in TestUldnOpenDialect()
188 uldn_close(ldn); in TestUldnOpenDialect()
199 ULocaleDisplayNames *ldn = uldn_open(Locale::getUS().getName(), ULDN_DIALECT_NAMES, &status); in TestUldnWithGarbage() local
200 …int32_t len = uldn_localeDisplayName(ldn, "english (United States) [w", result, kMaxResultSize, &s… in TestUldnWithGarbage()
201 uldn_close(ldn); in TestUldnWithGarbage()
212 ULocaleDisplayNames *ldn = uldn_open(Locale::getUS().getName(), ULDN_STANDARD_NAMES, &status); in TestUldnWithKeywordsAndEverything() local
213 int32_t len = uldn_localeDisplayName(ldn, locname, result, kMaxResultSize, &status); in TestUldnWithKeywordsAndEverything()
214 uldn_close(ldn); in TestUldnWithKeywordsAndEverything()
226 …ULocaleDisplayNames *ldn = uldn_open(Locale::getGermany().getName(), ULDN_STANDARD_NAMES, &status); in TestUldnComponents() local
235 int32_t len = uldn_languageDisplayName(ldn, "en", result, kMaxResultSize, &status); in TestUldnComponents()
242 int32_t len = uldn_scriptDisplayName(ldn, "Hant", result, kMaxResultSize, &status); in TestUldnComponents()
248 int32_t len = uldn_scriptCodeDisplayName(ldn, USCRIPT_TRADITIONAL_HAN, result, kMaxResultSize, in TestUldnComponents()
255 int32_t len = uldn_regionDisplayName(ldn, "US", result, kMaxResultSize, &status); in TestUldnComponents()
261 int32_t len = uldn_variantDisplayName(ldn, "PRE_EURO", result, kMaxResultSize, &status); in TestUldnComponents()
267 int32_t len = uldn_keyDisplayName(ldn, "calendar", result, kMaxResultSize, &status); in TestUldnComponents()
273 int32_t len = uldn_keyValueDisplayName(ldn, "calendar", "gregorian", result, in TestUldnComponents()
279 uldn_close(ldn); in TestUldnComponents()
410 LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getUS()); in TestRootEtc() local
413 ldn->localeDisplayName(locname, temp); in TestRootEtc()
416 ldn->languageDisplayName("root", temp); in TestRootEtc()
419 ldn->languageDisplayName("en_GB", temp); in TestRootEtc()
422 delete ldn; in TestRootEtc()
446 void LocaleDisplayNamesTest::VerifySubstitute(LocaleDisplayNames* ldn) { in VerifySubstitute() argument
449 UDisplayContext context = ldn->getContext(UDISPCTX_TYPE_SUBSTITUTE_HANDLING); in VerifySubstitute()
452 ldn->regionDisplayName(unknown_region, temp); in VerifySubstitute()
454 ldn->languageDisplayName(unknown_lang, temp); in VerifySubstitute()
456 ldn->scriptDisplayName(unknown_script, temp); in VerifySubstitute()
458 ldn->variantDisplayName(unknown_variant, temp); in VerifySubstitute()
460 ldn->keyDisplayName(unknown_key, temp); in VerifySubstitute()
462 ldn->keyValueDisplayName("ca", unknown_ca_value, temp); in VerifySubstitute()
465 ldn->localeDisplayName(unknown_lang, temp); in VerifySubstitute()
467 ldn->localeDisplayName(known_lang_unknown_script, temp); in VerifySubstitute()
469 ldn->localeDisplayName(unknown_lang_unknown_script, temp); in VerifySubstitute()
471 ldn->localeDisplayName(unknown_lang_known_script, temp); in VerifySubstitute()
473 ldn->localeDisplayName(unknown_lang_unknown_region, temp); in VerifySubstitute()
475 ldn->localeDisplayName(known_lang_unknown_region, temp); in VerifySubstitute()
477 ldn->localeDisplayName(unknown_lang_known_region, temp); in VerifySubstitute()
479 ldn->localeDisplayName(unknown_lang_unknown_script_unknown_region, temp); in VerifySubstitute()
481 ldn->localeDisplayName(known_lang_unknown_script_unknown_region, temp); in VerifySubstitute()
483 ldn->localeDisplayName(unknown_lang_known_script_unknown_region, temp); in VerifySubstitute()
485 ldn->localeDisplayName(unknown_lang_known_script_known_region, temp); in VerifySubstitute()
488 ldn->localeDisplayName(known_lang, temp); in VerifySubstitute()
490 ldn->localeDisplayName(known_lang_known_script, temp); in VerifySubstitute()
492 ldn->localeDisplayName(known_lang_known_region, temp); in VerifySubstitute()
494 ldn->localeDisplayName(known_lang_known_script_known_region, temp); in VerifySubstitute()
498 void LocaleDisplayNamesTest::VerifyNoSubstitute(LocaleDisplayNames* ldn) { in VerifyNoSubstitute() argument
502 UDisplayContext context = ldn->getContext(UDISPCTX_TYPE_SUBSTITUTE_HANDLING); in VerifyNoSubstitute()
505 ldn->regionDisplayName(unknown_region, temp); in VerifyNoSubstitute()
507 ldn->languageDisplayName(unknown_lang, temp); in VerifyNoSubstitute()
509 ldn->scriptDisplayName(unknown_script, temp); in VerifyNoSubstitute()
511 ldn->variantDisplayName(unknown_variant, temp); in VerifyNoSubstitute()
513 ldn->keyDisplayName(unknown_key, temp); in VerifyNoSubstitute()
515 ldn->keyValueDisplayName("ca", unknown_ca_value, temp); in VerifyNoSubstitute()
518 ldn->localeDisplayName(unknown_lang, temp); in VerifyNoSubstitute()
520 ldn->localeDisplayName(known_lang_unknown_script, temp); in VerifyNoSubstitute()
522 ldn->localeDisplayName(unknown_lang_unknown_script, temp); in VerifyNoSubstitute()
524 ldn->localeDisplayName(unknown_lang_known_script, temp); in VerifyNoSubstitute()
526 ldn->localeDisplayName(unknown_lang_unknown_region, temp); in VerifyNoSubstitute()
528 ldn->localeDisplayName(known_lang_unknown_region, temp); in VerifyNoSubstitute()
530 ldn->localeDisplayName(unknown_lang_known_region, temp); in VerifyNoSubstitute()
532 ldn->localeDisplayName(unknown_lang_unknown_script_unknown_region, temp); in VerifyNoSubstitute()
534 ldn->localeDisplayName(known_lang_unknown_script_unknown_region, temp); in VerifyNoSubstitute()
536 ldn->localeDisplayName(unknown_lang_known_script_unknown_region, temp); in VerifyNoSubstitute()
538 ldn->localeDisplayName(unknown_lang_known_script_known_region, temp); in VerifyNoSubstitute()
541 ldn->localeDisplayName(known_lang, temp); in VerifyNoSubstitute()
543 ldn->localeDisplayName(known_lang_known_script, temp); in VerifyNoSubstitute()
545 ldn->localeDisplayName(known_lang_known_region, temp); in VerifyNoSubstitute()
547 ldn->localeDisplayName(known_lang_known_script_known_region, temp); in VerifyNoSubstitute()
554 std::unique_ptr<LocaleDisplayNames> ldn(LocaleDisplayNames::createInstance(Locale::getGermany())); in TestSubstituteHandling() local
555 VerifySubstitute(ldn.get()); in TestSubstituteHandling()
560 ldn.reset(LocaleDisplayNames::createInstance(Locale::getGermany(), context_1, 2)); in TestSubstituteHandling()
561 VerifySubstitute(ldn.get()); in TestSubstituteHandling()
566 ldn.reset(LocaleDisplayNames::createInstance(Locale::getGermany(), context_2, 2)); in TestSubstituteHandling()
567 VerifySubstitute(ldn.get()); in TestSubstituteHandling()
572 ldn.reset(LocaleDisplayNames::createInstance(Locale::getGermany(), context_3, 2)); in TestSubstituteHandling()
573 VerifyNoSubstitute(ldn.get()); in TestSubstituteHandling()
578 ldn.reset(LocaleDisplayNames::createInstance(Locale::getGermany(), context_4, 2)); in TestSubstituteHandling()
579 VerifyNoSubstitute(ldn.get()); in TestSubstituteHandling()