]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/regcoll.h
1 /********************************************************************
3 * Copyright (c) 1997-2001, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
8 * Collation regression tests.
9 * (So we'll have no regrets later)
15 #include "unicode/utypes.h"
17 #if !UCONFIG_NO_COLLATION
19 #include "unicode/coleitr.h"
22 class CollationRegressionTest
: public IntlTestCollator
26 // If this is too small for the test data, just increase it.
27 // Just don't make it too large, otherwise the executable will get too big
28 enum EToken_Len
{ MAX_TOKEN_LEN
= 32 };
30 CollationRegressionTest();
31 virtual ~CollationRegressionTest();
33 void runIndexedTest( int32_t index
, UBool exec
, const char* &name
, char* par
= NULL
);
37 // CollationElementIterator.reset() doesn't work
39 void Test4048446(/* char* par */);
43 // Collator -> rules -> Collator round-trip broken for expanding characters
45 void Test4051866(/* char* par */);
49 // Collator thinks "black-bird" == "black"
51 void Test4053636(/* char* par */);
56 // CollationElementIterator will not work correctly if the associated
57 // Collator object's mode is changed
59 void Test4054238(/* char* par */);
63 // Collator.IDENTICAL documented but not implemented
65 void Test4054734(/* char* par */);
69 // Full Decomposition mode not implemented
71 void Test4054736(/* char* par */);
75 // Collator.getInstance() causes an ArrayIndexOutofBoundsException for Korean
77 void Test4058613(/* char* par */);
81 // RuleBasedCollator.getRules does not return the exact pattern as input
82 // for expanding character sequences
84 void Test4059820(/* char* par */);
88 // MergeCollation::fixEntry broken for "& H < \u0131, \u0130, i, I"
90 void Test4060154(/* char* par */);
94 // Secondary/Tertiary comparison incorrect in French Secondary
96 void Test4062418(/* char* par */);
100 // Collator.compare() method broken if either string contains spaces
102 void Test4065540(/* char* par */);
106 // Unicode characters need to be recursively decomposed to get the
107 // correct result. For example,
108 // u1EB1 -> \u0103 + \u0300 -> a + \u0306 + \u0300.
110 void Test4066189(/* char* par */);
114 // French secondary collation checking at the end of compare iteration fails
116 void Test4066696(/* char* par */);
121 // Bad canonicalization of same-class combining characters
123 void Test4076676(/* char* par */);
128 // RuleBasedCollator breaks on "< a < bb" rule
130 void Test4078588(/* char* par */);
134 // RuleBasedCollator.equals(null) throws NullPointerException
136 void Test4079231(/* char* par */);
140 // Combining characters in different classes not reordered properly.
142 void Test4081866(/* char* par */);
146 // string comparison errors in Scandinavian collators
148 void Test4087241(/* char* par */);
152 // CollationKey takes ignorable strings into account when it shouldn't
154 void Test4087243(/* char* par */);
159 // Micro symbol and greek lowercase letter Mu should sort identically
161 void Test4092260(/* char* par */);
165 void Test4095316(/* char* par */);
169 void Test4101940(/* char* par */);
173 // Collator.compare not handling spaces properly
175 void Test4103436(/* char* par */);
179 // Collation not Unicode conformant with Hangul syllables
181 void Test4114076(/* char* par */);
186 // Collation with decomposition off doesn't work for Europe
188 void Test4114077(/* char* par */);
192 // Collator.getCollationKey was hanging on certain character sequences
194 void Test4124632(/* char* par */);
198 // sort order of french words with multiple accents has errors
200 void Test4132736(/* char* par */);
204 // The sorting using java.text.CollationKey is not in the exact order
206 void Test4133509(/* char* par */);
210 // getCollationKey throws exception for spanish text
211 // Cannot reproduce this bug on 1.2, however it DOES fail on 1.1.6
213 void Test4139572(/* char* par */);
217 // Support for Swedish gone in 1.1.6 (Can't create Swedish collator)
219 void Test4141640(/* char* par */);
223 // RuleBasedCollator doesn't use getCollationElementIterator internally
225 void Test4146160(/* char* par */);
228 //------------------------------------------------------------------------
229 // Internal utilities
231 void compareArray(Collator
&c
,
232 const UChar tests
[][CollationRegressionTest::MAX_TOKEN_LEN
],
235 void assertEqual(CollationElementIterator
&i1
, CollationElementIterator
&i2
);
238 RuleBasedCollator
*en_us
;
242 #endif /* #if !UCONFIG_NO_COLLATION */