]> git.saurik.com Git - apple/icu.git/blob - icuSources/test/cintltst/capitst.h
ICU-6.2.22.tar.gz
[apple/icu.git] / icuSources / test / cintltst / capitst.h
1 /********************************************************************
2 * COPYRIGHT:
3 * Copyright (c) 1997-2004, 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 #define MAX_TOKEN_LEN 16
25
26
27 /**
28 * error reporting utility method
29 **/
30
31 static void doAssert(int condition, const char *message);
32 /**
33 * Collator Class Properties
34 * ctor, dtor, createInstance, compare, getStrength/setStrength
35 * getDecomposition/setDecomposition, getDisplayName
36 */
37 void TestProperty(void);
38 /**
39 * Test RuleBasedCollator and getRules
40 **/
41 void TestRuleBasedColl(void);
42
43 /**
44 * Test compare
45 **/
46 void TestCompare(void);
47 /**
48 * Test hashCode functionality
49 **/
50 void TestHashCode(void);
51 /**
52 * Tests the constructor and numerous other methods for CollationKey
53 **/
54 void TestSortKey(void);
55 /**
56 * test the CollationElementIterator methods
57 **/
58 void TestElemIter(void);
59 /**
60 * Test ucol_getAvailable and ucol_countAvailable()
61 **/
62 void TestGetAll(void);
63 /**
64 * Test ucol_GetDefaultRules ()
65 void TestGetDefaultRules(void);
66 **/
67
68 void TestDecomposition(void);
69 /**
70 * Test ucol_safeClone ()
71 **/
72 void TestSafeClone(void);
73
74 /**
75 * Test getting bounds for a sortkey
76 */
77 void TestBounds(void);
78
79 /**
80 * Test ucol_getLocale function
81 */
82 void TestGetLocale(void);
83
84 /**
85 * Test buffer overrun while having smaller buffer for sortkey (j1865)
86 */
87 void TestSortKeyBufferOverrun(void);
88 /**
89 * Test getting and setting of attributes
90 */
91 void TestGetSetAttr(void);
92 /**
93 * Test getTailoredSet
94 */
95 void TestGetTailoredSet(void);
96
97 /**
98 * Test mergeSortKeys
99 */
100 void TestMergeSortKeys(void);
101
102 /**
103 * utility function, defined in cmsccoll.c
104 */
105 void genericLocaleStarter(const char *locale, const char *s[], uint32_t size);
106
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 #endif /* #if !UCONFIG_NO_COLLATION */
120
121 #endif