]>
Commit | Line | Data |
---|---|---|
1 | /******************************************************************** | |
2 | * Copyright (c) 1997-2009 International Business Machines | |
3 | * Corporation and others. All Rights Reserved. | |
4 | ********************************************************************/ | |
5 | /******************************************************************************** | |
6 | * | |
7 | * File CAPITEST.H | |
8 | * | |
9 | * Modification History: | |
10 | * Name Description | |
11 | * Madhu Katragadda Converted to C | |
12 | * Brian Rower Added TestOpenVsOpenRules | |
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 ucol_open() vs. ucol_openRules() | |
82 | **/ | |
83 | void TestOpenVsOpenRules(void); | |
84 | ||
85 | /** | |
86 | * Test getting bounds for a sortkey | |
87 | */ | |
88 | void TestBounds(void); | |
89 | ||
90 | /** | |
91 | * Test ucol_getLocale function | |
92 | */ | |
93 | void TestGetLocale(void); | |
94 | ||
95 | /** | |
96 | * Test buffer overrun while having smaller buffer for sortkey (j1865) | |
97 | */ | |
98 | void TestSortKeyBufferOverrun(void); | |
99 | /** | |
100 | * Test getting and setting of attributes | |
101 | */ | |
102 | void TestGetSetAttr(void); | |
103 | /** | |
104 | * Test getTailoredSet | |
105 | */ | |
106 | void TestGetTailoredSet(void); | |
107 | ||
108 | /** | |
109 | * Test mergeSortKeys | |
110 | */ | |
111 | void TestMergeSortKeys(void); | |
112 | ||
113 | /** | |
114 | * test short string and collator identifier functions | |
115 | */ | |
116 | static void TestShortString(void); | |
117 | ||
118 | /** | |
119 | * test getContractions and getUnsafeSet | |
120 | */ | |
121 | static void TestGetContractionsAndUnsafes(void); | |
122 | ||
123 | /** | |
124 | * Test funny stuff with open binary | |
125 | */ | |
126 | static void TestOpenBinary(void); | |
127 | ||
128 | /** | |
129 | * Test getKeywordValuesForLocale API | |
130 | */ | |
131 | static void TestGetKeywordValuesForLocale(void); | |
132 | #endif /* #if !UCONFIG_NO_COLLATION */ | |
133 | ||
134 | #endif |