]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/regcoll.h
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /********************************************************************
5 * Copyright (c) 1997-2014, International Business Machines Corporation and
6 * others. All Rights Reserved.
7 ********************************************************************/
10 * Collation regression tests.
11 * (So we'll have no regrets later)
17 #include "unicode/utypes.h"
19 #if !UCONFIG_NO_COLLATION
21 #include "unicode/coleitr.h"
24 class CollationRegressionTest
: public IntlTestCollator
28 // If this is too small for the test data, just increase it.
29 // Just don't make it too large, otherwise the executable will get too big
30 enum EToken_Len
{ MAX_TOKEN_LEN
= 32 };
32 CollationRegressionTest();
33 virtual ~CollationRegressionTest();
35 void runIndexedTest( int32_t index
, UBool exec
, const char* &name
, char* par
= NULL
);
39 // CollationElementIterator.reset() doesn't work
41 void Test4048446(/* char* par */);
45 // Collator -> rules -> Collator round-trip broken for expanding characters
47 void Test4051866(/* char* par */);
51 // Collator thinks "black-bird" == "black"
53 void Test4053636(/* char* par */);
58 // CollationElementIterator will not work correctly if the associated
59 // Collator object's mode is changed
61 void Test4054238(/* char* par */);
65 // Collator.IDENTICAL documented but not implemented
67 void Test4054734(/* char* par */);
71 // Full Decomposition mode not implemented
73 void Test4054736(/* char* par */);
77 // Collator.getInstance() causes an ArrayIndexOutofBoundsException for Korean
79 void Test4058613(/* char* par */);
83 // RuleBasedCollator.getRules does not return the exact pattern as input
84 // for expanding character sequences
86 void Test4059820(/* char* par */);
90 // MergeCollation::fixEntry broken for "& H < \u0131, \u0130, i, I"
92 void Test4060154(/* char* par */);
96 // Secondary/Tertiary comparison incorrect in French Secondary
98 void Test4062418(/* char* par */);
102 // Collator.compare() method broken if either string contains spaces
104 void Test4065540(/* char* par */);
108 // Unicode characters need to be recursively decomposed to get the
109 // correct result. For example,
110 // u1EB1 -> \u0103 + \u0300 -> a + \u0306 + \u0300.
112 void Test4066189(/* char* par */);
116 // French secondary collation checking at the end of compare iteration fails
118 void Test4066696(/* char* par */);
123 // Bad canonicalization of same-class combining characters
125 void Test4076676(/* char* par */);
130 // RuleBasedCollator breaks on "< a < bb" rule
132 void Test4078588(/* char* par */);
136 // RuleBasedCollator.equals(null) throws NullPointerException
138 void Test4079231(/* char* par */);
142 // Combining characters in different classes not reordered properly.
144 void Test4081866(/* char* par */);
148 // string comparison errors in Scandinavian collators
150 void Test4087241(/* char* par */);
154 // CollationKey takes ignorable strings into account when it shouldn't
156 void Test4087243(/* char* par */);
161 // Micro symbol and greek lowercase letter Mu should sort identically
163 void Test4092260(/* char* par */);
167 void Test4095316(/* char* par */);
171 void Test4101940(/* char* par */);
175 // Collator.compare not handling spaces properly
177 void Test4103436(/* char* par */);
181 // Collation not Unicode conformant with Hangul syllables
183 void Test4114076(/* char* par */);
188 // Collation with decomposition off doesn't work for Europe
190 void Test4114077(/* char* par */);
194 // Collator.getCollationKey was hanging on certain character sequences
196 void Test4124632(/* char* par */);
200 // sort order of french words with multiple accents has errors
202 void Test4132736(/* char* par */);
206 // The sorting using java.text.CollationKey is not in the exact order
208 void Test4133509(/* char* par */);
212 // getCollationKey throws exception for spanish text
213 // Cannot reproduce this bug on 1.2, however it DOES fail on 1.1.6
215 void Test4139572(/* char* par */);
219 // Support for Swedish gone in 1.1.6 (Can't create Swedish collator)
221 void Test4141640(/* char* par */);
225 // RuleBasedCollator doesn't use getCollationElementIterator internally
227 void Test4146160(/* char* par */);
233 // nextSortKeyPart incorrect for EO_S1 collation
239 // Tertiary value compression problem with case first option enabled
241 void TestCaseFirstCompression();
243 void TestTrailingComment();
244 void TestBeforeWithTooStrongAfter();
247 //------------------------------------------------------------------------
248 // Internal utilities
250 void compareArray(Collator
&c
,
251 const UChar tests
[][CollationRegressionTest::MAX_TOKEN_LEN
],
254 void assertEqual(CollationElementIterator
&i1
, CollationElementIterator
&i2
);
257 RuleBasedCollator
*en_us
;
259 void caseFirstCompressionSub(Collator
*col
, UnicodeString opt
);
262 #endif /* #if !UCONFIG_NO_COLLATION */