summaryrefslogtreecommitdiff
path: root/icu4c/source/test/cintltst/cloctst.h
blob: 0aee5012cd29343cc851fad61c3935b815dad5bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/********************************************************************
 * COPYRIGHT:
 * Copyright (c) 1997-2014, International Business Machines Corporation and
 * others. All Rights Reserved.
 ********************************************************************/
/********************************************************************************
*
* File CLOCTST.H
*
* Modification History:
*        Name                     Description
*     Madhu Katragadda            Converted to C
*********************************************************************************
*/
#ifndef _CLOCTEST
#define _CLOCTEST

#include "cintltst.h"
/*C API TEST FOR LOCALE */

/**
 * Test functions to set and get data fields
 **/
static void TestBasicGetters(void);
static void TestPrefixes(void);
static void TestVariantLengthLimit(void);

/**
 * Use Locale to access Resource file data and compare against expected values
 **/
static void TestSimpleResourceInfo(void);
/**
 * Use Locale to access Resource file display names and compare against expected values
 **/
static  void TestDisplayNames(void);
static  void TestGetDisplayScriptPreFlighting21160(void);

/**
 * Test getAvailableLocales
 **/
static void TestGetAvailableLocales(void);
static void TestGetAvailableLocalesByType(void);
/**
 * Test functions to set and access a custom data directory
 **/
 static void TestDataDirectory(void);
/**
 * Test functions to test get ISO countries and Languages
 **/
 static void TestISOFunctions(void);
/**
 * Test functions to test get ISO3 countries and Languages Fallback
 **/
 static void TestISO3Fallback(void);
/**
 * Test functions to test get ISO3 countries and Languages for Uninstalled locales
 **/
 static void TestUninstalledISO3Names(void);
 static void TestObsoleteNames(void);
/**
 * Test functions uloc_getDisplaynames()
 **/
 static void TestSimpleDisplayNames(void);
/**
 * Test functions uloc_getDisplaynames()
 **/
 static void TestVariantParsing(void);

 /* Test getting keyword enumeratin */
 static void TestKeywordVariants(void);

 static void TestKeywordSet(void);
 static void TestKeywordSetError(void);

 /* Test getting keyword values */
 static void TestKeywordVariantParsing(void);
 
 /* Test warning for no data in getDisplay* */
 static void TestDisplayNameWarning(void);

 /* Test uloc_getLocaleForLCID */
 static void TestGetLocaleForLCID(void);

/**
 * routine to perform subtests, used by TestDisplayNames
 */
 static void doTestDisplayNames(const char* inLocale, int32_t compareIndex);

 static void TestCanonicalization(void);
 static void TestCanonicalizationBuffer(void);
static  void TestCanonicalization21749StackUseAfterScope(void);

 static void TestDisplayKeywords(void);

 static void TestDisplayKeywordValues(void);

 static void TestGetBaseName(void);

static void TestTrailingNull(void);

static void TestGetLocale(void);

/**
 * additional initialization for datatables storing expected values
 */
static void setUpDataTable(void);
static void cleanUpDataTable(void);
/*static void displayDataTable(void);*/
static void TestAcceptLanguage(void);

/**
 * test locale aliases 
*/
static void TestCalendar(void); 
static void TestDateFormat(void);
static void TestCollation(void);
static void TestULocale(void);
static void TestUResourceBundle(void);
static void TestDisplayName(void);

static void TestAcceptLanguage(void);

static void TestOrientation(void);

static void TestLikelySubtags(void);

/**
 * test terminate correctly.
 */
static void Test21157CorrectTerminating(void);

/**
 * language tag
 */
static void TestForLanguageTag(void);
static void TestToLanguageTag(void);
static void TestBug20132(void);
static void TestLangAndRegionCanonicalize(void);

static void TestToUnicodeLocaleKey(void);
static void TestToLegacyKey(void);
static void TestToUnicodeLocaleType(void);
static void TestToLegacyType(void);
static void TestBug20149(void);
static void TestCDefaultLocale(void);
static void TestBug21449InfiniteLoop(void);


/**
 * U_USING_DEFAULT_WARNING
 */
static void TestUsingDefaultWarning(void);

/**
 * locale data
 */
static void TestEnglishExemplarCharacters(void);

#endif