]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/cintltst/capitst.h
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /********************************************************************
4 * Copyright (c) 1997-2013 International Business Machines
5 * Corporation and others. All Rights Reserved.
6 ********************************************************************/
7 /********************************************************************************
11 * Modification History:
13 * Madhu Katragadda Converted to C
14 * Brian Rower Added TestOpenVsOpenRules
15 *********************************************************************************
16 *//* C API TEST For COLLATOR */
21 #include "unicode/utypes.h"
23 #if !UCONFIG_NO_COLLATION
27 #define MAX_TOKEN_LEN 16
31 * error reporting utility method
34 static void doAssert(int condition
, const char *message
);
36 * Collator Class Properties
37 * ctor, dtor, createInstance, compare, getStrength/setStrength
38 * getDecomposition/setDecomposition, getDisplayName
40 void TestProperty(void);
42 * Test RuleBasedCollator and getRules
44 void TestRuleBasedColl(void);
49 void TestCompare(void);
51 * Test hashCode functionality
53 void TestHashCode(void);
55 * Tests the constructor and numerous other methods for CollationKey
57 void TestSortKey(void);
59 * test the CollationElementIterator methods
61 void TestElemIter(void);
63 * Test ucol_getAvailable and ucol_countAvailable()
65 void TestGetAll(void);
67 * Test ucol_GetDefaultRules ()
68 void TestGetDefaultRules(void);
71 void TestDecomposition(void);
73 * Test ucol_safeClone ()
75 void TestSafeClone(void);
78 * Test ucol_cloneBinary(), ucol_openBinary()
80 void TestCloneBinary(void);
83 * Test ucol_open() vs. ucol_openRules()
85 void TestOpenVsOpenRules(void);
88 * Test getting bounds for a sortkey
90 void TestBounds(void);
93 * Test ucol_getLocale function
95 void TestGetLocale(void);
98 * Test buffer overrun while having smaller buffer for sortkey (j1865)
100 void TestSortKeyBufferOverrun(void);
102 * Test getting and setting of attributes
104 void TestGetSetAttr(void);
106 * Test getTailoredSet
108 void TestGetTailoredSet(void);
113 void TestMergeSortKeys(void);
116 * test short string and collator identifier functions
118 static void TestShortString(void);
121 * test getContractions and getUnsafeSet
123 static void TestGetContractionsAndUnsafes(void);
126 * Test funny stuff with open binary
128 static void TestOpenBinary(void);
131 * Test getKeywordValuesForLocale API
133 static void TestGetKeywordValuesForLocale(void);
136 * test strcoll with null arg
138 static void TestStrcollNull(void);
140 #endif /* #if !UCONFIG_NO_COLLATION */