]> git.saurik.com Git - apple/icu.git/blob - icuSources/test/cintltst/capitst.h
ICU-400.42.tar.gz
[apple/icu.git] / icuSources / test / cintltst / capitst.h
1 /********************************************************************
2 * COPYRIGHT:
3 * Copyright (c) 1997-2006, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
6 /********************************************************************************
7 *
8 * File CAPITEST.H
9 *
10 * Modification History:
11 * Name Description
12 * Madhu Katragadda Converted to C
13 *********************************************************************************
14 *//* C API TEST For COLLATOR */
15
16 #ifndef _CCOLLAPITST
17 #define _CCOLLAPITST
18
19 #include "unicode/utypes.h"
20
21 #if !UCONFIG_NO_COLLATION
22
23 #include "cintltst.h"
24 #include "callcoll.h"
25 #define MAX_TOKEN_LEN 16
26
27
28 /**
29 * error reporting utility method
30 **/
31
32 static void doAssert(int condition, const char *message);
33 /**
34 * Collator Class Properties
35 * ctor, dtor, createInstance, compare, getStrength/setStrength
36 * getDecomposition/setDecomposition, getDisplayName
37 */
38 void TestProperty(void);
39 /**
40 * Test RuleBasedCollator and getRules
41 **/
42 void TestRuleBasedColl(void);
43
44 /**
45 * Test compare
46 **/
47 void TestCompare(void);
48 /**
49 * Test hashCode functionality
50 **/
51 void TestHashCode(void);
52 /**
53 * Tests the constructor and numerous other methods for CollationKey
54 **/
55 void TestSortKey(void);
56 /**
57 * test the CollationElementIterator methods
58 **/
59 void TestElemIter(void);
60 /**
61 * Test ucol_getAvailable and ucol_countAvailable()
62 **/
63 void TestGetAll(void);
64 /**
65 * Test ucol_GetDefaultRules ()
66 void TestGetDefaultRules(void);
67 **/
68
69 void TestDecomposition(void);
70 /**
71 * Test ucol_safeClone ()
72 **/
73 void TestSafeClone(void);
74
75 /**
76 * Test ucol_cloneBinary(), ucol_openBinary()
77 **/
78 void TestCloneBinary(void);
79
80 /**
81 * Test getting bounds for a sortkey
82 */
83 void TestBounds(void);
84
85 /**
86 * Test ucol_getLocale function
87 */
88 void TestGetLocale(void);
89
90 /**
91 * Test buffer overrun while having smaller buffer for sortkey (j1865)
92 */
93 void TestSortKeyBufferOverrun(void);
94 /**
95 * Test getting and setting of attributes
96 */
97 void TestGetSetAttr(void);
98 /**
99 * Test getTailoredSet
100 */
101 void TestGetTailoredSet(void);
102
103 /**
104 * Test mergeSortKeys
105 */
106 void TestMergeSortKeys(void);
107
108 /**
109 * test short string and collator identifier functions
110 */
111 static void TestShortString(void);
112
113 /**
114 * test getContractions and getUnsafeSet
115 */
116 static void TestGetContractionsAndUnsafes(void);
117
118 /**
119 * Test funny stuff with open binary
120 */
121 static void TestOpenBinary(void);
122 #endif /* #if !UCONFIG_NO_COLLATION */
123
124 #endif