1
/********************************************************************
3
* Copyright (c) 1997-2001, International Business Machines Corporation and
4
* others. All Rights Reserved.
5
********************************************************************/
8
* CollationEnglishTest is a third level test class. This tests the locale
9
* specific primary, secondary and tertiary rules. For example, the ignorable
10
* character '-' in string "black-bird". The en_US locale uses the default
11
* collation rules as its sorting sequence.
19
class CollationEnglishTest: public IntlTestCollator {
21
// If this is too small for the test data, just increase it.
22
// Just don't make it too large, otherwise the executable will get too big
23
enum EToken_Len { MAX_TOKEN_LEN = 16 };
25
CollationEnglishTest();
26
virtual ~CollationEnglishTest();
27
void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
29
// main test routine, tests rules defined by the "en" locale
30
void doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result);
32
// performs test with strength PRIMARY
33
void TestPrimary(/* char* par */);
35
// perform test with strength SECONDARY
36
void TestSecondary(/* char* par */);
38
// perform test with strength TERTIARY
39
void TestTertiary(/* char* par */);
42
static const UChar testBugs[][MAX_TOKEN_LEN];
43
static const UChar testSourceCases[][MAX_TOKEN_LEN];
44
static const UChar testTargetCases[][MAX_TOKEN_LEN];
45
static const Collator::EComparisonResult results[];
46
static const UChar testAcute[][MAX_TOKEN_LEN];
48
Collator *myCollation;