Lines Matching refs:ldn
96 LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getGermany()); in TestCreate() local
97 ldn->localeDisplayName("de_DE", temp); in TestCreate()
98 delete ldn; in TestCreate()
104 LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getUS(), ULDN_DIALECT_NAMES); in TestCreateDialect() local
105 ldn->localeDisplayName("en_GB", temp); in TestCreateDialect()
106 delete ldn; in TestCreateDialect()
112 LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getUS()); in TestWithKeywordsAndEverything() local
116 ldn->localeDisplayName(locname, temp); in TestWithKeywordsAndEverything()
117 delete ldn; in TestWithKeywordsAndEverything()
123 LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getUS()); in TestCurrencyKeyword() local
126 ldn->localeDisplayName(locname, temp); in TestCurrencyKeyword()
127 delete ldn; in TestCurrencyKeyword()
133 LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getUS()); in TestUnknownCurrencyKeyword() local
136 ldn->localeDisplayName(locname, temp); in TestUnknownCurrencyKeyword()
137 delete ldn; in TestUnknownCurrencyKeyword()
143 LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getUS()); in TestUntranslatedKeywords() local
146 ldn->localeDisplayName(locname, temp); in TestUntranslatedKeywords()
147 delete ldn; in TestUntranslatedKeywords()
153 LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getUS()); in TestPrivateUse() local
156 ldn->localeDisplayName(locname, temp); in TestPrivateUse()
157 delete ldn; in TestPrivateUse()
165 …ULocaleDisplayNames *ldn = uldn_open(Locale::getGermany().getName(), ULDN_STANDARD_NAMES, &status); in TestUldnOpen() local
166 int32_t len = uldn_localeDisplayName(ldn, "de_DE", result, kMaxResultSize, &status); in TestUldnOpen()
167 uldn_close(ldn); in TestUldnOpen()
174 ldn = uldn_open(NULL, ULDN_STANDARD_NAMES, &status); in TestUldnOpen()
175 const char *locale = uldn_getLocale(ldn); in TestUldnOpen()
179 uldn_close(ldn); in TestUldnOpen()
187 ULocaleDisplayNames *ldn = uldn_open(Locale::getUS().getName(), ULDN_DIALECT_NAMES, &status); in TestUldnOpenDialect() local
188 int32_t len = uldn_localeDisplayName(ldn, "en_GB", result, kMaxResultSize, &status); in TestUldnOpenDialect()
189 uldn_close(ldn); in TestUldnOpenDialect()
200 ULocaleDisplayNames *ldn = uldn_open(Locale::getUS().getName(), ULDN_DIALECT_NAMES, &status); in TestUldnWithGarbage() local
201 …int32_t len = uldn_localeDisplayName(ldn, "english (United States) [w", result, kMaxResultSize, &s… in TestUldnWithGarbage()
202 uldn_close(ldn); in TestUldnWithGarbage()
213 ULocaleDisplayNames *ldn = uldn_open(Locale::getUS().getName(), ULDN_STANDARD_NAMES, &status); in TestUldnWithKeywordsAndEverything() local
214 int32_t len = uldn_localeDisplayName(ldn, locname, result, kMaxResultSize, &status); in TestUldnWithKeywordsAndEverything()
215 uldn_close(ldn); in TestUldnWithKeywordsAndEverything()
227 …ULocaleDisplayNames *ldn = uldn_open(Locale::getGermany().getName(), ULDN_STANDARD_NAMES, &status); in TestUldnComponents() local
236 int32_t len = uldn_languageDisplayName(ldn, "en", result, kMaxResultSize, &status); in TestUldnComponents()
243 int32_t len = uldn_scriptDisplayName(ldn, "Hant", result, kMaxResultSize, &status); in TestUldnComponents()
249 int32_t len = uldn_scriptCodeDisplayName(ldn, USCRIPT_TRADITIONAL_HAN, result, kMaxResultSize, in TestUldnComponents()
256 int32_t len = uldn_regionDisplayName(ldn, "US", result, kMaxResultSize, &status); in TestUldnComponents()
262 int32_t len = uldn_variantDisplayName(ldn, "PRE_EURO", result, kMaxResultSize, &status); in TestUldnComponents()
268 int32_t len = uldn_keyDisplayName(ldn, "calendar", result, kMaxResultSize, &status); in TestUldnComponents()
274 int32_t len = uldn_keyValueDisplayName(ldn, "calendar", "gregorian", result, in TestUldnComponents()
280 uldn_close(ldn); in TestUldnComponents()
409 LocaleDisplayNames *ldn = LocaleDisplayNames::createInstance(Locale::getUS()); in TestRootEtc() local
412 ldn->localeDisplayName(locname, temp); in TestRootEtc()
415 ldn->languageDisplayName("root", temp); in TestRootEtc()
418 ldn->languageDisplayName("en_GB", temp); in TestRootEtc()
421 delete ldn; in TestRootEtc()
426 ULocaleDisplayNames* ldn = uldn_open("es_MX", ULDN_STANDARD_NAMES, &err); in TestNumericRegionID() local
428 int32_t displayNameLength = uldn_regionDisplayName(ldn, "019", displayName, 200, &err); in TestNumericRegionID()
431 uldn_close(ldn); in TestNumericRegionID()
434 ldn = uldn_open("en_AU", ULDN_STANDARD_NAMES, &err); in TestNumericRegionID()
435 displayNameLength = uldn_regionDisplayName(ldn, "002", displayName, 200, &err); in TestNumericRegionID()
438 uldn_close(ldn); in TestNumericRegionID()
462 void LocaleDisplayNamesTest::VerifySubstitute(LocaleDisplayNames* ldn) { in VerifySubstitute() argument
465 UDisplayContext context = ldn->getContext(UDISPCTX_TYPE_SUBSTITUTE_HANDLING); in VerifySubstitute()
468 ldn->regionDisplayName(unknown_region, temp); in VerifySubstitute()
470 ldn->languageDisplayName(unknown_lang, temp); in VerifySubstitute()
472 ldn->scriptDisplayName(unknown_script, temp); in VerifySubstitute()
474 ldn->variantDisplayName(unknown_variant, temp); in VerifySubstitute()
476 ldn->keyDisplayName(unknown_key, temp); in VerifySubstitute()
478 ldn->keyValueDisplayName("ca", unknown_ca_value, temp); in VerifySubstitute()
481 ldn->localeDisplayName(unknown_lang, temp); in VerifySubstitute()
483 ldn->localeDisplayName(known_lang_unknown_script, temp); in VerifySubstitute()
485 ldn->localeDisplayName(unknown_lang_unknown_script, temp); in VerifySubstitute()
487 ldn->localeDisplayName(unknown_lang_known_script, temp); in VerifySubstitute()
489 ldn->localeDisplayName(unknown_lang_unknown_region, temp); in VerifySubstitute()
491 ldn->localeDisplayName(known_lang_unknown_region, temp); in VerifySubstitute()
493 ldn->localeDisplayName(unknown_lang_known_region, temp); in VerifySubstitute()
495 ldn->localeDisplayName(unknown_lang_unknown_script_unknown_region, temp); in VerifySubstitute()
497 ldn->localeDisplayName(known_lang_unknown_script_unknown_region, temp); in VerifySubstitute()
499 ldn->localeDisplayName(unknown_lang_known_script_unknown_region, temp); in VerifySubstitute()
501 ldn->localeDisplayName(unknown_lang_known_script_known_region, temp); in VerifySubstitute()
504 ldn->localeDisplayName(known_lang, temp); in VerifySubstitute()
506 ldn->localeDisplayName(known_lang_known_script, temp); in VerifySubstitute()
508 ldn->localeDisplayName(known_lang_known_region, temp); in VerifySubstitute()
510 ldn->localeDisplayName(known_lang_known_script_known_region, temp); in VerifySubstitute()
514 void LocaleDisplayNamesTest::VerifyNoSubstitute(LocaleDisplayNames* ldn) { in VerifyNoSubstitute() argument
518 UDisplayContext context = ldn->getContext(UDISPCTX_TYPE_SUBSTITUTE_HANDLING); in VerifyNoSubstitute()
521 ldn->regionDisplayName(unknown_region, temp); in VerifyNoSubstitute()
523 ldn->languageDisplayName(unknown_lang, temp); in VerifyNoSubstitute()
525 ldn->scriptDisplayName(unknown_script, temp); in VerifyNoSubstitute()
527 ldn->variantDisplayName(unknown_variant, temp); in VerifyNoSubstitute()
529 ldn->keyDisplayName(unknown_key, temp); in VerifyNoSubstitute()
531 ldn->keyValueDisplayName("ca", unknown_ca_value, temp); in VerifyNoSubstitute()
534 ldn->localeDisplayName(unknown_lang, temp); in VerifyNoSubstitute()
536 ldn->localeDisplayName(known_lang_unknown_script, temp); in VerifyNoSubstitute()
538 ldn->localeDisplayName(unknown_lang_unknown_script, temp); in VerifyNoSubstitute()
540 ldn->localeDisplayName(unknown_lang_known_script, temp); in VerifyNoSubstitute()
542 ldn->localeDisplayName(unknown_lang_unknown_region, temp); in VerifyNoSubstitute()
544 ldn->localeDisplayName(known_lang_unknown_region, temp); in VerifyNoSubstitute()
546 ldn->localeDisplayName(unknown_lang_known_region, temp); in VerifyNoSubstitute()
548 ldn->localeDisplayName(unknown_lang_unknown_script_unknown_region, temp); in VerifyNoSubstitute()
550 ldn->localeDisplayName(known_lang_unknown_script_unknown_region, temp); in VerifyNoSubstitute()
552 ldn->localeDisplayName(unknown_lang_known_script_unknown_region, temp); in VerifyNoSubstitute()
554 ldn->localeDisplayName(unknown_lang_known_script_known_region, temp); in VerifyNoSubstitute()
557 ldn->localeDisplayName(known_lang, temp); in VerifyNoSubstitute()
559 ldn->localeDisplayName(known_lang_known_script, temp); in VerifyNoSubstitute()
561 ldn->localeDisplayName(known_lang_known_region, temp); in VerifyNoSubstitute()
563 ldn->localeDisplayName(known_lang_known_script_known_region, temp); in VerifyNoSubstitute()
570 std::unique_ptr<LocaleDisplayNames> ldn(LocaleDisplayNames::createInstance(Locale::getGermany())); in TestSubstituteHandling() local
571 VerifySubstitute(ldn.get()); in TestSubstituteHandling()
576 ldn.reset(LocaleDisplayNames::createInstance(Locale::getGermany(), context_1, 2)); in TestSubstituteHandling()
577 VerifySubstitute(ldn.get()); in TestSubstituteHandling()
582 ldn.reset(LocaleDisplayNames::createInstance(Locale::getGermany(), context_2, 2)); in TestSubstituteHandling()
583 VerifySubstitute(ldn.get()); in TestSubstituteHandling()
588 ldn.reset(LocaleDisplayNames::createInstance(Locale::getGermany(), context_3, 2)); in TestSubstituteHandling()
589 VerifyNoSubstitute(ldn.get()); in TestSubstituteHandling()
594 ldn.reset(LocaleDisplayNames::createInstance(Locale::getGermany(), context_4, 2)); in TestSubstituteHandling()
595 VerifyNoSubstitute(ldn.get()); in TestSubstituteHandling()