1 /*********************************************************************
3 * Copyright (c) 2010-2014, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 *********************************************************************/
12 test_assert( Test (should be TRUE) )
17 the macro is ugly but makes the tests pretty.
20 #define test_assert(test) \
23 errln("FAIL: " #test " was not true. In " __FILE__ " on line %d", __LINE__ ); \
25 logln("PASS: asserted " #test); \
30 test_assert_print( Test (should be TRUE), printable )
33 test_assert(i==3, toString(i));
35 the macro is ugly but makes the tests pretty.
38 #define test_assert_print(test,print) \
41 errln("FAIL: " #test " was not true. " + UnicodeString(print) ); \
43 logln("PASS: asserted " #test "-> " + UnicodeString(print)); \
46 #define test_assert_equal(target,value) \
48 if (UnicodeString(target)!=(value)) { \
49 logln("unexpected value '" + (value) + "'"); \
50 dataerrln("FAIL: " #target " == " #value " was not true. In " __FILE__ " on line %d", __LINE__); \
52 logln("PASS: asserted " #target " == " #value); \
56 #define test_dumpLocale(l) { logln(#l " = " + UnicodeString(l.getName(), "")); }
58 LocaleDisplayNamesTest::LocaleDisplayNamesTest() {
61 LocaleDisplayNamesTest::~LocaleDisplayNamesTest() {
64 void LocaleDisplayNamesTest::runIndexedTest(int32_t index
, UBool exec
, const char* &name
,
67 #if !UCONFIG_NO_FORMATTING
68 TESTCASE(0, TestCreate
);
69 TESTCASE(1, TestCreateDialect
);
70 TESTCASE(2, TestWithKeywordsAndEverything
);
71 TESTCASE(3, TestUldnOpen
);
72 TESTCASE(4, TestUldnOpenDialect
);
73 TESTCASE(5, TestUldnWithKeywordsAndEverything
);
74 TESTCASE(6, TestUldnComponents
);
75 TESTCASE(7, TestRootEtc
);
76 TESTCASE(8, TestCurrencyKeyword
);
77 TESTCASE(9, TestUnknownCurrencyKeyword
);
78 TESTCASE(10, TestUntranslatedKeywords
);
79 TESTCASE(11, TestPrivateUse
);
80 TESTCASE(12, TestUldnDisplayContext
);
88 #if !UCONFIG_NO_FORMATTING
89 void LocaleDisplayNamesTest::TestCreate() {
91 LocaleDisplayNames
*ldn
= LocaleDisplayNames::createInstance(Locale::getGermany());
92 ldn
->localeDisplayName("de_DE", temp
);
94 test_assert_equal("Deutsch (Deutschland)", temp
);
97 void LocaleDisplayNamesTest::TestCreateDialect() {
99 LocaleDisplayNames
*ldn
= LocaleDisplayNames::createInstance(Locale::getUS(), ULDN_DIALECT_NAMES
);
100 ldn
->localeDisplayName("en_GB", temp
);
102 test_assert_equal("British English", temp
);
105 void LocaleDisplayNamesTest::TestWithKeywordsAndEverything() {
107 LocaleDisplayNames
*ldn
= LocaleDisplayNames::createInstance(Locale::getUS());
108 const char *locname
= "en_Hant_US_VALLEY@calendar=gregorian;collation=phonebook";
109 const char *target
= "English (Traditional, US, VALLEY, "
110 "Gregorian Calendar, Phonebook Sort Order)";
111 ldn
->localeDisplayName(locname
, temp
);
113 test_assert_equal(target
, temp
);
116 void LocaleDisplayNamesTest::TestCurrencyKeyword() {
118 LocaleDisplayNames
*ldn
= LocaleDisplayNames::createInstance(Locale::getUS());
119 const char *locname
= "ja@currency=JPY";
120 const char *target
= "Japanese (Japanese Yen)";
121 ldn
->localeDisplayName(locname
, temp
);
123 test_assert_equal(target
, temp
);
126 void LocaleDisplayNamesTest::TestUnknownCurrencyKeyword() {
128 LocaleDisplayNames
*ldn
= LocaleDisplayNames::createInstance(Locale::getUS());
129 const char *locname
= "de@currency=XYZ";
130 const char *target
= "German (Currency: XYZ)";
131 ldn
->localeDisplayName(locname
, temp
);
133 test_assert_equal(target
, temp
);
136 void LocaleDisplayNamesTest::TestUntranslatedKeywords() {
138 LocaleDisplayNames
*ldn
= LocaleDisplayNames::createInstance(Locale::getUS());
139 const char *locname
= "de@foo=bar";
140 const char *target
= "German (foo=bar)";
141 ldn
->localeDisplayName(locname
, temp
);
143 test_assert_equal(target
, temp
);
146 void LocaleDisplayNamesTest::TestPrivateUse() {
148 LocaleDisplayNames
*ldn
= LocaleDisplayNames::createInstance(Locale::getUS());
149 const char *locname
= "de@x=foobar";
150 const char *target
= "German (Private-Use: foobar)";
151 ldn
->localeDisplayName(locname
, temp
);
153 test_assert_equal(target
, temp
);
156 void LocaleDisplayNamesTest::TestUldnOpen() {
157 UErrorCode status
= U_ZERO_ERROR
;
158 const int32_t kMaxResultSize
= 150; // long enough
160 ULocaleDisplayNames
*ldn
= uldn_open(Locale::getGermany().getName(), ULDN_STANDARD_NAMES
, &status
);
161 int32_t len
= uldn_localeDisplayName(ldn
, "de_DE", result
, kMaxResultSize
, &status
);
163 test_assert(U_SUCCESS(status
));
165 UnicodeString
str(result
, len
, kMaxResultSize
);
166 test_assert_equal("Deutsch (Deutschland)", str
);
168 // make sure that NULL gives us the default locale as usual
169 ldn
= uldn_open(NULL
, ULDN_STANDARD_NAMES
, &status
);
170 const char *locale
= uldn_getLocale(ldn
);
171 if(0 != uprv_strcmp(uloc_getDefault(), locale
)) {
172 errln("uldn_getLocale(uldn_open(NULL))=%s != default locale %s\n", locale
, uloc_getDefault());
175 test_assert(U_SUCCESS(status
));
178 void LocaleDisplayNamesTest::TestUldnOpenDialect() {
179 UErrorCode status
= U_ZERO_ERROR
;
180 const int32_t kMaxResultSize
= 150; // long enough
182 ULocaleDisplayNames
*ldn
= uldn_open(Locale::getUS().getName(), ULDN_DIALECT_NAMES
, &status
);
183 int32_t len
= uldn_localeDisplayName(ldn
, "en_GB", result
, kMaxResultSize
, &status
);
185 test_assert(U_SUCCESS(status
));
187 UnicodeString
str(result
, len
, kMaxResultSize
);
188 test_assert_equal("British English", str
);
191 void LocaleDisplayNamesTest::TestUldnWithKeywordsAndEverything() {
192 UErrorCode status
= U_ZERO_ERROR
;
193 const int32_t kMaxResultSize
= 150; // long enough
195 const char *locname
= "en_Hant_US_VALLEY@calendar=gregorian;collation=phonebook";
196 const char *target
= "English (Traditional, US, VALLEY, "
197 "Gregorian Calendar, Phonebook Sort Order)";
198 ULocaleDisplayNames
*ldn
= uldn_open(Locale::getUS().getName(), ULDN_STANDARD_NAMES
, &status
);
199 int32_t len
= uldn_localeDisplayName(ldn
, locname
, result
, kMaxResultSize
, &status
);
201 test_assert(U_SUCCESS(status
));
203 UnicodeString
str(result
, len
, kMaxResultSize
);
204 test_assert_equal(target
, str
);
207 void LocaleDisplayNamesTest::TestUldnComponents() {
208 UErrorCode status
= U_ZERO_ERROR
;
209 const int32_t kMaxResultSize
= 150; // long enough
212 ULocaleDisplayNames
*ldn
= uldn_open(Locale::getGermany().getName(), ULDN_STANDARD_NAMES
, &status
);
213 test_assert(U_SUCCESS(status
));
214 if (U_FAILURE(status
)) {
218 // "en_Hant_US_PRE_EURO@calendar=gregorian";
221 int32_t len
= uldn_languageDisplayName(ldn
, "en", result
, kMaxResultSize
, &status
);
222 UnicodeString
str(result
, len
, kMaxResultSize
);
223 test_assert_equal("Englisch", str
);
228 int32_t len
= uldn_scriptDisplayName(ldn
, "Hant", result
, kMaxResultSize
, &status
);
229 UnicodeString
str(result
, len
, kMaxResultSize
);
230 test_assert_equal("Traditionell", str
);
234 int32_t len
= uldn_scriptCodeDisplayName(ldn
, USCRIPT_TRADITIONAL_HAN
, result
, kMaxResultSize
,
236 UnicodeString
str(result
, len
, kMaxResultSize
);
237 test_assert_equal("Traditionell", str
);
241 int32_t len
= uldn_regionDisplayName(ldn
, "US", result
, kMaxResultSize
, &status
);
242 UnicodeString
str(result
, len
, kMaxResultSize
);
243 test_assert_equal("Vereinigte Staaten", str
);
247 int32_t len
= uldn_variantDisplayName(ldn
, "PRE_EURO", result
, kMaxResultSize
, &status
);
248 UnicodeString
str(result
, len
, kMaxResultSize
);
249 test_assert_equal("PRE_EURO", str
);
253 int32_t len
= uldn_keyDisplayName(ldn
, "calendar", result
, kMaxResultSize
, &status
);
254 UnicodeString
str(result
, len
, kMaxResultSize
);
255 test_assert_equal("Kalender", str
);
259 int32_t len
= uldn_keyValueDisplayName(ldn
, "calendar", "gregorian", result
,
260 kMaxResultSize
, &status
);
261 UnicodeString
str(result
, len
, kMaxResultSize
);
262 test_assert_equal("Gregorianischer Kalender", str
);
270 const char * displayLocale
;
271 UDisplayContext dialectHandling
;
272 UDisplayContext capitalization
;
273 UDisplayContext displayLength
;
274 const char * localeToBeNamed
;
275 const UChar
* result
;
276 } LocNameDispContextItem
;
278 static char en
[] = "en";
279 static char en_GB
[] = "en_GB";
281 static UChar daFor_en
[] = {0x65,0x6E,0x67,0x65,0x6C,0x73,0x6B,0}; //"engelsk"
282 static UChar daFor_en_GB
[] = {0x65,0x6E,0x67,0x65,0x6C,0x73,0x6B,0x20,0x28,0x55,0x4B,0x29,0}; //"engelsk (UK)" // Apple change
283 static UChar daFor_en_GB_S
[] = {0x65,0x6E,0x67,0x65,0x6C,0x73,0x6B,0x20,0x28,0x55,0x4B,0x29,0}; //"engelsk (UK)"
284 static UChar daFor_en_GB_D
[] = {0x62,0x72,0x69,0x74,0x69,0x73,0x6B,0x20,0x65,0x6E,0x67,0x65,0x6C,0x73,0x6B,0}; //"britisk engelsk"
285 static UChar esFor_en
[] = {0x69,0x6E,0x67,0x6C,0xE9,0x73,0}; //"ingles" with acute on the e
286 static UChar esFor_en_GB
[] = {0x69,0x6E,0x67,0x6C,0xE9,0x73,0x20,0x28,0x52,0x55,0x29,0}; //"ingles (RU)" ... // Apple change
287 static UChar esFor_en_GB_S
[] = {0x69,0x6E,0x67,0x6C,0xE9,0x73,0x20,0x28,0x52,0x55,0x29,0}; //"ingles (RU)" ...
288 static UChar esFor_en_GB_D
[] = {0x69,0x6E,0x67,0x6C,0xE9,0x73,0x20,0x62,0x72,0x69,0x74,0xE1,0x6E,0x69,0x63,0x6F,0}; //"ingles britanico" with acute on the e, a
289 #if !UCONFIG_NO_BREAK_ITERATION
290 static UChar daFor_en_T
[] = {0x45,0x6E,0x67,0x65,0x6C,0x73,0x6B,0}; //"Engelsk"
291 static UChar daFor_en_GB_T
[] = {0x45,0x6E,0x67,0x65,0x6C,0x73,0x6B,0x20,0x28,0x55,0x4B,0x29,0}; //"Engelsk (UK)" // Apple change
292 static UChar daFor_en_GB_ST
[] = {0x45,0x6E,0x67,0x65,0x6C,0x73,0x6B,0x20,0x28,0x55,0x4B,0x29,0}; //"Engelsk (UK)"
293 static UChar daFor_en_GB_DT
[] = {0x42,0x72,0x69,0x74,0x69,0x73,0x6B,0x20,0x65,0x6E,0x67,0x65,0x6C,0x73,0x6B,0}; //"Britisk engelsk"
294 static UChar esFor_en_T
[] = {0x49,0x6E,0x67,0x6C,0xE9,0x73,0}; //"Ingles" with acute on the e
295 static UChar esFor_en_GB_T
[] = {0x49,0x6E,0x67,0x6C,0xE9,0x73,0x20,0x28,0x52,0x55,0x29,0}; //"Ingles (RU)" ... // Apple change
296 static UChar esFor_en_GB_ST
[] = {0x49,0x6E,0x67,0x6C,0xE9,0x73,0x20,0x28,0x52,0x55,0x29,0}; //"Ingles (RU)" ...
297 static UChar esFor_en_GB_DT
[] = {0x49,0x6E,0x67,0x6C,0xE9,0x73,0x20,0x62,0x72,0x69,0x74,0xE1,0x6E,0x69,0x63,0x6F,0}; //"Ingles britanico" with acute on the e, a
298 #endif /* #if !UCONFIG_NO_BREAK_ITERATION */
300 static const LocNameDispContextItem ctxtItems
[] = {
301 { "da", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE
, UDISPCTX_LENGTH_FULL
, en
, daFor_en
},
302 { "da", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE
, UDISPCTX_LENGTH_FULL
, en_GB
, daFor_en_GB
},
303 { "da", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE
, UDISPCTX_LENGTH_SHORT
, en_GB
, daFor_en_GB_S
},
304 { "da", UDISPCTX_DIALECT_NAMES
, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE
, UDISPCTX_LENGTH_FULL
, en_GB
, daFor_en_GB_D
},
305 { "es", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE
, UDISPCTX_LENGTH_FULL
, en
, esFor_en
},
306 { "es", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE
, UDISPCTX_LENGTH_FULL
, en_GB
, esFor_en_GB
},
307 { "es", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE
, UDISPCTX_LENGTH_SHORT
, en_GB
, esFor_en_GB_S
},
308 { "es", UDISPCTX_DIALECT_NAMES
, UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE
, UDISPCTX_LENGTH_FULL
, en_GB
, esFor_en_GB_D
},
309 #if !UCONFIG_NO_BREAK_ITERATION
310 { "da", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE
, UDISPCTX_LENGTH_FULL
, en
, daFor_en_T
},
311 { "da", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE
, UDISPCTX_LENGTH_FULL
, en_GB
, daFor_en_GB_T
},
312 { "da", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE
, UDISPCTX_LENGTH_SHORT
, en_GB
, daFor_en_GB_ST
},
313 { "da", UDISPCTX_DIALECT_NAMES
, UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE
, UDISPCTX_LENGTH_FULL
, en_GB
, daFor_en_GB_DT
},
314 { "es", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE
, UDISPCTX_LENGTH_FULL
, en
, esFor_en_T
},
315 { "es", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE
, UDISPCTX_LENGTH_FULL
, en_GB
, esFor_en_GB_T
},
316 { "es", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE
, UDISPCTX_LENGTH_SHORT
, en_GB
, esFor_en_GB_ST
},
317 { "es", UDISPCTX_DIALECT_NAMES
, UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE
, UDISPCTX_LENGTH_FULL
, en_GB
, esFor_en_GB_DT
},
319 { "da", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU
, UDISPCTX_LENGTH_FULL
, en
, daFor_en_T
},
320 { "da", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU
, UDISPCTX_LENGTH_FULL
, en_GB
, daFor_en_GB_T
},
321 { "da", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU
, UDISPCTX_LENGTH_SHORT
, en_GB
, daFor_en_GB_ST
},
322 { "da", UDISPCTX_DIALECT_NAMES
, UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU
, UDISPCTX_LENGTH_FULL
, en_GB
, daFor_en_GB_DT
},
323 { "es", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU
, UDISPCTX_LENGTH_FULL
, en
, esFor_en_T
},
324 { "es", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU
, UDISPCTX_LENGTH_FULL
, en_GB
, esFor_en_GB_T
},
325 { "es", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU
, UDISPCTX_LENGTH_SHORT
, en_GB
, esFor_en_GB_ST
},
326 { "es", UDISPCTX_DIALECT_NAMES
, UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU
, UDISPCTX_LENGTH_FULL
, en_GB
, esFor_en_GB_DT
},
328 { "da", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_STANDALONE
, UDISPCTX_LENGTH_FULL
, en
, daFor_en
},
329 { "da", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_STANDALONE
, UDISPCTX_LENGTH_FULL
, en_GB
, daFor_en_GB
},
330 { "da", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_STANDALONE
, UDISPCTX_LENGTH_SHORT
, en_GB
, daFor_en_GB_S
},
331 { "da", UDISPCTX_DIALECT_NAMES
, UDISPCTX_CAPITALIZATION_FOR_STANDALONE
, UDISPCTX_LENGTH_FULL
, en_GB
, daFor_en_GB_D
},
332 { "es", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_STANDALONE
, UDISPCTX_LENGTH_FULL
, en
, esFor_en_T
},
333 { "es", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_STANDALONE
, UDISPCTX_LENGTH_FULL
, en_GB
, esFor_en_GB_T
},
334 { "es", UDISPCTX_STANDARD_NAMES
, UDISPCTX_CAPITALIZATION_FOR_STANDALONE
, UDISPCTX_LENGTH_SHORT
, en_GB
, esFor_en_GB_ST
},
335 { "es", UDISPCTX_DIALECT_NAMES
, UDISPCTX_CAPITALIZATION_FOR_STANDALONE
, UDISPCTX_LENGTH_FULL
, en_GB
, esFor_en_GB_DT
},
336 #endif /* #if !UCONFIG_NO_BREAK_ITERATION */
337 { NULL
, (UDisplayContext
)0, (UDisplayContext
)0, (UDisplayContext
)0, NULL
, NULL
}
340 void LocaleDisplayNamesTest::TestUldnDisplayContext() {
341 const LocNameDispContextItem
* ctxtItemPtr
;
342 for (ctxtItemPtr
= ctxtItems
; ctxtItemPtr
->displayLocale
!= NULL
; ctxtItemPtr
++) {
343 UDisplayContext contexts
[3] = {ctxtItemPtr
->dialectHandling
, ctxtItemPtr
->capitalization
, ctxtItemPtr
->displayLength
};
344 UErrorCode status
= U_ZERO_ERROR
;
345 ULocaleDisplayNames
* uldn
= uldn_openForContext(ctxtItemPtr
->displayLocale
, contexts
, 3, &status
);
346 if (U_FAILURE(status
)) {
347 errln(UnicodeString("FAIL: uldn_openForContext failed for locale ") + ctxtItemPtr
->displayLocale
+
348 ", dialectHandling " + ctxtItemPtr
->dialectHandling
+
349 ", capitalization " + ctxtItemPtr
->capitalization
+
350 ", displayLength " + ctxtItemPtr
->displayLength
);
352 UDisplayContext dialectHandling
= uldn_getContext(uldn
, UDISPCTX_TYPE_DIALECT_HANDLING
, &status
);
353 UDisplayContext capitalization
= uldn_getContext(uldn
, UDISPCTX_TYPE_CAPITALIZATION
, &status
);
354 UDisplayContext displayLength
= uldn_getContext(uldn
, UDISPCTX_TYPE_DISPLAY_LENGTH
, &status
);
355 if (U_FAILURE(status
)) {
356 errln(UnicodeString("FAIL: uldn_getContext status ") + (int)status
);
357 } else if (dialectHandling
!= ctxtItemPtr
->dialectHandling
||
358 capitalization
!= ctxtItemPtr
->capitalization
||
359 displayLength
!= ctxtItemPtr
->displayLength
) {
360 errln("FAIL: uldn_getContext retrieved incorrect dialectHandling, capitalization, or displayLength");
362 UChar nameBuf
[ULOC_FULLNAME_CAPACITY
];
363 int32_t len
= uldn_localeDisplayName(uldn
, ctxtItemPtr
->localeToBeNamed
, nameBuf
, ULOC_FULLNAME_CAPACITY
, &status
);
364 if (U_FAILURE(status
)) {
365 dataerrln(UnicodeString("FAIL: uldn_localeDisplayName status: ") + u_errorName(status
));
366 } else if (u_strcmp(ctxtItemPtr
->result
, nameBuf
) != 0) {
367 UnicodeString
exp(ctxtItemPtr
->result
, u_strlen(ctxtItemPtr
->result
));
368 UnicodeString
got(nameBuf
, len
);
369 dataerrln(UnicodeString("FAIL: uldn_localeDisplayName, capitalization ") + ctxtItemPtr
->capitalization
+
370 ", expected " + exp
+ ", got " + got
);
378 void LocaleDisplayNamesTest::TestRootEtc() {
380 LocaleDisplayNames
*ldn
= LocaleDisplayNames::createInstance(Locale::getUS());
381 const char *locname
= "@collation=phonebook";
382 const char *target
= "Root (Phonebook Sort Order)";
383 ldn
->localeDisplayName(locname
, temp
);
384 test_assert_equal(target
, temp
);
386 ldn
->languageDisplayName("root", temp
);
387 test_assert_equal("root", temp
);
389 ldn
->languageDisplayName("en_GB", temp
);
390 test_assert_equal("en_GB", temp
);
395 #endif /* UCONFIG_NO_FORMATTING */