]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/apicoll.h
1 /***********************************************************************
3 * Copyright (c) 1997-2004, International Business Machines Corporation
4 * and others. All Rights Reserved.
5 ***********************************************************************/
8 * CollationAPITest is a third level test class. This test performs API
9 * related tests for the Collation framework.
15 #include "unicode/utypes.h"
17 #if !UCONFIG_NO_COLLATION
19 #include "unicode/tblcoll.h"
22 class CollationAPITest
: public IntlTestCollator
{
24 void runIndexedTest( int32_t index
, UBool exec
, const char* &name
, char* /*par = NULL */);
25 void doAssert(UBool condition
, const char *message
);
28 * This tests the properties of a collator object.
29 * - constructor/destructor
30 * - factory method createInstance
31 * - compare and getCollationKey
32 * - get/set decomposition mode and comparison level
33 * - displayable name in the desired locale
35 void TestProperty(/* char* par */);
38 * This tests the RuleBasedCollator
39 * - constructor/destructor
42 void TestRuleBasedColl(/* char* par */);
45 * This tests the RuleBasedCollator
48 void TestRules(/* char* par */);
51 * Tests decomposition setting
53 void TestDecomposition();
61 * This tests the properties of a rule based collator object.
62 * - constructor/destructor
63 * - == and != operators
65 * - collation rules access
67 void TestOperators(/* char* par */);
70 * This tests the duplication of a collator object.
72 void TestDuplicate(/* char* par */);
75 * This tests the comparison convenience methods of a collator object.
77 * - greater than or equal to
80 void TestCompare(/* char* par */);
83 * This tests the hashCode method of a collator object.
85 void TestHashCode(/* char* par */);
88 * This tests the collation key related APIs.
89 * - constructor/destructor
90 * - Collator::getCollationKey
91 * - == and != operators
92 * - comparison between collation keys
93 * - creating collation key with a byte array and vice versa
95 void TestCollationKey(/* char* par */);
98 * This tests the CollationElementIterator related APIs.
99 * - creation of a CollationElementIterator object
100 * - == and != operators
101 * - iterating forward
102 * - reseting the iterator index
103 * - requesting the order properties(primary, secondary or tertiary)
105 void TestElemIter(/* char* par */);
108 * This tests the list the all available locales.
110 void TestGetAll(/* char* par */);
113 * This tests the sort keys generated by collator
118 * This tests getMaxExpansion
120 void TestMaxExpansion();
123 * Tests the retrieval of names given a locale
125 void TestDisplayName();
128 * Tests the collator attributes
130 void TestAttribute();
133 * Tests the setters and getters of variable top
135 void TestVariableTopSetting();
138 * Tests GetLocale for a Collator
140 void TestGetLocale();
148 * Tests getTailoredSet API
150 void TestGetTailoredSet();
153 * Tests the subclassability
158 * Tests the dynamic and static ids of collation classes
165 void TestNULLCharTailoring();
168 // If this is too small for the test data, just increase it.
169 // Just don't make it too large, otherwise the executable will get too big
170 enum EToken_Len
{ MAX_TOKEN_LEN
= 16 };
174 #endif /* #if !UCONFIG_NO_COLLATION */