• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /********************************************************************
4  * COPYRIGHT:
5  * Copyright (c) 1997-2014, International Business Machines Corporation and
6  * others. All Rights Reserved.
7  ********************************************************************/
8 /********************************************************************************
9 *
10 * File CLOCTST.H
11 *
12 * Modification History:
13 *        Name                     Description
14 *     Madhu Katragadda            Converted to C
15 *********************************************************************************
16 */
17 #ifndef _CLOCTEST
18 #define _CLOCTEST
19 
20 #include "cintltst.h"
21 /*C API TEST FOR LOCALE */
22 
23 /**
24  * Test functions to set and get data fields
25  **/
26 static void TestBasicGetters(void);
27 static void TestPrefixes(void);
28 /**
29  * Use Locale to access Resource file data and compare against expected values
30  **/
31 static void TestSimpleResourceInfo(void);
32 /**
33  * Use Locale to access Resource file display names and compare against expected values
34  **/
35 static  void TestDisplayNames(void);
36 /**
37  * Test getAvailableLocales
38  **/
39 static void TestGetAvailableLocales(void);
40 static void TestGetAvailableLocalesByType(void);
41 /**
42  * Test functions to set and access a custom data directory
43  **/
44  static void TestDataDirectory(void);
45 /**
46  * Test functions to test get ISO countries and Languages
47  **/
48  static void TestISOFunctions(void);
49 /**
50  * Test functions to test get ISO3 countries and Languages Fallback
51  **/
52  static void TestISO3Fallback(void);
53 /**
54  * Test functions to test get ISO3 countries and Languages for Uninstalled locales
55  **/
56  static void TestUninstalledISO3Names(void);
57  static void TestObsoleteNames(void);
58 /**
59  * Test functions uloc_getDisplaynames()
60  **/
61  static void TestSimpleDisplayNames(void);
62 /**
63  * Test functions uloc_getDisplaynames()
64  **/
65  static void TestVariantParsing(void);
66 
67  /* Test getting keyword enumeratin */
68  static void TestKeywordVariants(void);
69 
70  static void TestKeywordSet(void);
71  static void TestKeywordSetError(void);
72 
73  /* Test getting keyword values */
74  static void TestKeywordVariantParsing(void);
75 
76  /* Test warning for no data in getDisplay* */
77  static void TestDisplayNameWarning(void);
78 
79  /* Test uloc_getLocaleForLCID */
80  static void TestGetLocaleForLCID(void);
81 
82 /**
83  * routine to perform subtests, used by TestDisplayNames
84  */
85  static void doTestDisplayNames(const char* inLocale, int32_t compareIndex);
86 
87  static void TestCanonicalization(void);
88  static void TestCanonicalizationBuffer(void);
89 
90  static void TestDisplayKeywords(void);
91 
92  static void TestDisplayKeywordValues(void);
93 
94  static void TestGetBaseName(void);
95 
96 static void TestTrailingNull(void);
97 
98 static void TestGetLocale(void);
99 
100 /**
101  * additional intialization for datatables storing expected values
102  */
103 static void setUpDataTable(void);
104 static void cleanUpDataTable(void);
105 /*static void displayDataTable(void);*/
106 static void TestAcceptLanguage(void);
107 
108 /**
109  * test locale aliases
110 */
111 static void TestCalendar(void);
112 static void TestDateFormat(void);
113 static void TestCollation(void);
114 static void TestULocale(void);
115 static void TestUResourceBundle(void);
116 static void TestDisplayName(void);
117 
118 static void TestAcceptLanguage(void);
119 
120 static void TestOrientation(void);
121 
122 static void TestLikelySubtags(void);
123 
124 /**
125  * language tag
126  */
127 static void TestForLanguageTag(void);
128 static void TestToLanguageTag(void);
129 static void TestBug20132(void);
130 static void TestLangAndRegionCanonicalize(void);
131 
132 static void TestToUnicodeLocaleKey(void);
133 static void TestToLegacyKey(void);
134 static void TestToUnicodeLocaleType(void);
135 static void TestToLegacyType(void);
136 static void TestBug20149(void);
137 
138 /**
139  * locale data
140  */
141 static void TestEnglishExemplarCharacters(void);
142 
143 #endif
144