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 static void TestGetDisplayScriptPreFlighting21160(void); 37 38 /** 39 * Test getAvailableLocales 40 **/ 41 static void TestGetAvailableLocales(void); 42 static void TestGetAvailableLocalesByType(void); 43 /** 44 * Test functions to set and access a custom data directory 45 **/ 46 static void TestDataDirectory(void); 47 /** 48 * Test functions to test get ISO countries and Languages 49 **/ 50 static void TestISOFunctions(void); 51 /** 52 * Test functions to test get ISO3 countries and Languages Fallback 53 **/ 54 static void TestISO3Fallback(void); 55 /** 56 * Test functions to test get ISO3 countries and Languages for Uninstalled locales 57 **/ 58 static void TestUninstalledISO3Names(void); 59 static void TestObsoleteNames(void); 60 /** 61 * Test functions uloc_getDisplaynames() 62 **/ 63 static void TestSimpleDisplayNames(void); 64 /** 65 * Test functions uloc_getDisplaynames() 66 **/ 67 static void TestVariantParsing(void); 68 69 /* Test getting keyword enumeratin */ 70 static void TestKeywordVariants(void); 71 72 static void TestKeywordSet(void); 73 static void TestKeywordSetError(void); 74 75 /* Test getting keyword values */ 76 static void TestKeywordVariantParsing(void); 77 78 /* Test warning for no data in getDisplay* */ 79 static void TestDisplayNameWarning(void); 80 81 /* Test uloc_getLocaleForLCID */ 82 static void TestGetLocaleForLCID(void); 83 84 /** 85 * routine to perform subtests, used by TestDisplayNames 86 */ 87 static void doTestDisplayNames(const char* inLocale, int32_t compareIndex); 88 89 static void TestCanonicalization(void); 90 static void TestCanonicalizationBuffer(void); 91 92 static void TestDisplayKeywords(void); 93 94 static void TestDisplayKeywordValues(void); 95 96 static void TestGetBaseName(void); 97 98 static void TestTrailingNull(void); 99 100 static void TestGetLocale(void); 101 102 /** 103 * additional intialization for datatables storing expected values 104 */ 105 static void setUpDataTable(void); 106 static void cleanUpDataTable(void); 107 /*static void displayDataTable(void);*/ 108 static void TestAcceptLanguage(void); 109 110 /** 111 * test locale aliases 112 */ 113 static void TestCalendar(void); 114 static void TestDateFormat(void); 115 static void TestCollation(void); 116 static void TestULocale(void); 117 static void TestUResourceBundle(void); 118 static void TestDisplayName(void); 119 120 static void TestAcceptLanguage(void); 121 122 static void TestOrientation(void); 123 124 static void TestLikelySubtags(void); 125 126 /** 127 * test terminate correctly. 128 */ 129 static void Test21157CorrectTerminating(void); 130 131 /** 132 * language tag 133 */ 134 static void TestForLanguageTag(void); 135 static void TestToLanguageTag(void); 136 static void TestBug20132(void); 137 static void TestLangAndRegionCanonicalize(void); 138 139 static void TestToUnicodeLocaleKey(void); 140 static void TestToLegacyKey(void); 141 static void TestToUnicodeLocaleType(void); 142 static void TestToLegacyType(void); 143 static void TestBug20149(void); 144 static void TestCDefaultLocale(void); 145 static void TestBug21449InfiniteLoop(void); 146 147 148 /** 149 * U_USING_DEFAULT_WARNING 150 */ 151 static void TestUsingDefaultWarning(void); 152 153 /** 154 * locale data 155 */ 156 static void TestEnglishExemplarCharacters(void); 157 158 #endif 159