Fredrik Roubert | 0596fae | 2017-04-18 21:34:02 +0200 | [diff] [blame^] | 1 | // © 2016 and later: Unicode, Inc. and others. |
Fredrik Roubert | 64339d3 | 2016-10-21 19:43:16 +0200 | [diff] [blame] | 2 | // License & terms of use: http://www.unicode.org/copyright.html |
Jean-Baptiste Queru | b13da9d | 2009-07-17 17:53:22 -0700 | [diff] [blame] | 3 | /******************************************************************** |
claireho | 50294ea | 2010-05-03 15:44:48 -0700 | [diff] [blame] | 4 | * COPYRIGHT: |
ccornelius | f9878a2 | 2014-11-20 18:09:39 -0800 | [diff] [blame] | 5 | * Copyright (c) 1997-2014, International Business Machines Corporation and |
Jean-Baptiste Queru | b13da9d | 2009-07-17 17:53:22 -0700 | [diff] [blame] | 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 | /** |
| 41 | * Test functions to set and access a custom data directory |
| 42 | **/ |
| 43 | static void TestDataDirectory(void); |
| 44 | /** |
| 45 | * Test functions to test get ISO countries and Languages |
| 46 | **/ |
| 47 | static void TestISOFunctions(void); |
| 48 | /** |
| 49 | * Test functions to test get ISO3 countries and Languages Fallback |
| 50 | **/ |
| 51 | static void TestISO3Fallback(void); |
| 52 | /** |
| 53 | * Test functions to test get ISO3 countries and Languages for Uninstalled locales |
| 54 | **/ |
| 55 | static void TestUninstalledISO3Names(void); |
| 56 | static void TestObsoleteNames(void); |
| 57 | /** |
| 58 | * Test functions uloc_getDisplaynames() |
| 59 | **/ |
| 60 | static void TestSimpleDisplayNames(void); |
| 61 | /** |
| 62 | * Test functions uloc_getDisplaynames() |
| 63 | **/ |
| 64 | static void TestVariantParsing(void); |
| 65 | |
| 66 | /* Test getting keyword enumeratin */ |
| 67 | static void TestKeywordVariants(void); |
| 68 | |
| 69 | static void TestKeywordSet(void); |
| 70 | static void TestKeywordSetError(void); |
| 71 | |
| 72 | /* Test getting keyword values */ |
| 73 | static void TestKeywordVariantParsing(void); |
| 74 | |
| 75 | /* Test warning for no data in getDisplay* */ |
| 76 | static void TestDisplayNameWarning(void); |
| 77 | |
| 78 | /* Test uloc_getLocaleForLCID */ |
| 79 | static void TestGetLocaleForLCID(void); |
| 80 | |
| 81 | /** |
| 82 | * routine to perform subtests, used by TestDisplayNames |
| 83 | */ |
| 84 | static void doTestDisplayNames(const char* inLocale, int32_t compareIndex); |
| 85 | |
| 86 | static void TestCanonicalization(void); |
| 87 | |
| 88 | static void TestDisplayKeywords(void); |
| 89 | |
| 90 | static void TestDisplayKeywordValues(void); |
| 91 | |
| 92 | static void TestGetBaseName(void); |
| 93 | |
claireho | 50294ea | 2010-05-03 15:44:48 -0700 | [diff] [blame] | 94 | static void TestTrailingNull(void); |
| 95 | |
Jean-Baptiste Queru | b13da9d | 2009-07-17 17:53:22 -0700 | [diff] [blame] | 96 | static void TestGetLocale(void); |
| 97 | |
| 98 | /** |
| 99 | * additional intialization for datatables storing expected values |
| 100 | */ |
| 101 | static void setUpDataTable(void); |
| 102 | static void cleanUpDataTable(void); |
| 103 | /*static void displayDataTable(void);*/ |
| 104 | static void TestAcceptLanguage(void); |
| 105 | |
| 106 | /** |
| 107 | * test locale aliases |
| 108 | */ |
| 109 | static void TestCalendar(void); |
| 110 | static void TestDateFormat(void); |
| 111 | static void TestCollation(void); |
| 112 | static void TestULocale(void); |
| 113 | static void TestUResourceBundle(void); |
| 114 | static void TestDisplayName(void); |
| 115 | |
| 116 | static void TestAcceptLanguage(void); |
| 117 | |
Jean-Baptiste Queru | c69afce | 2009-07-20 15:02:39 -0700 | [diff] [blame] | 118 | static void TestOrientation(void); |
| 119 | |
| 120 | static void TestLikelySubtags(void); |
| 121 | |
Jean-Baptiste Queru | b0ac937 | 2009-07-20 15:09:32 -0700 | [diff] [blame] | 122 | /** |
| 123 | * lanuage tag |
| 124 | */ |
| 125 | static void TestForLanguageTag(void); |
| 126 | static void TestToLanguageTag(void); |
Craig Cornelius | 8393335 | 2013-06-14 14:20:29 -0700 | [diff] [blame] | 127 | |
ccornelius | f9878a2 | 2014-11-20 18:09:39 -0800 | [diff] [blame] | 128 | static void TestToUnicodeLocaleKey(void); |
| 129 | static void TestToLegacyKey(void); |
| 130 | static void TestToUnicodeLocaleType(void); |
| 131 | static void TestToLegacyType(void); |
| 132 | |
Craig Cornelius | 8393335 | 2013-06-14 14:20:29 -0700 | [diff] [blame] | 133 | /** |
| 134 | * locale data |
| 135 | */ |
| 136 | static void TestEnglishExemplarCharacters(void); |
| 137 | |
Jean-Baptiste Queru | b13da9d | 2009-07-17 17:53:22 -0700 | [diff] [blame] | 138 | #endif |