]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/intltest/g7coll.h
ICU-461.18.tar.gz
[apple/icu.git] / icuSources / test / intltest / g7coll.h
CommitLineData
b75a7d8f
A
1/********************************************************************
2 * COPYRIGHT:
46f4442e 3 * Copyright (c) 1997-2006, International Business Machines Corporation and
b75a7d8f
A
4 * others. All Rights Reserved.
5 ********************************************************************/
6
7/**
8 * G7CollationTest is a third level test class. This test performs the examples
9 * mentioned on the IBM Java international demos web site.
10 * Sample Rules: & Z < p , P
11 * Effect : Making P sort after Z.
12 *
13 * Sample Rules: & c < ch , cH, Ch, CH
14 * Effect : As well as adding sequences of characters that act as a single character (this is
15 * known as contraction), you can also add characters that act like a sequence of
16 * characters (this is known as expansion).
17 *
18 * Sample Rules: & Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'
19 * Effect : Expansion and contraction can actually be combined.
20 *
21 * Sample Rules: & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-'
22 * Effect : sorted sequence as the following,
23 * aardvark
24 * a-rdvark
25 * abbot
26 * coop
27 * co-p
28 * cop
29 */
30
31#ifndef _G7COLL
32#define _G7COLL
33
34#include "unicode/utypes.h"
35
36#if !UCONFIG_NO_COLLATION
37
38#include "unicode/tblcoll.h"
39#include "tscoll.h"
40
41class G7CollationTest: public IntlTestCollator {
42public:
43 // If this is too small for the test data, just increase it.
44 // Just don't make it too large, otherwise the executable will get too big
45 enum EToken_Len { MAX_TOKEN_LEN = 16 };
46
47 enum ETotal_Locales { TESTLOCALES = 12 };
48 enum ETotal_Fixed { FIXEDTESTSET = 15 };
49 enum ETotal_Test { TOTALTESTSET = 30 };
50
51 G7CollationTest() {}
374ca955 52 virtual ~G7CollationTest();
b75a7d8f
A
53 void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
54
55
56 // perform test for G7 locales
57 void TestG7Locales(/* char* par */);
58
59 // perform test with added rules " & Z < p, P"
60 void TestDemo1(/* char* par */);
61
62 // perorm test with added rules "& C < ch , cH, Ch, CH"
63 void TestDemo2(/* char* par */);
64
65 // perform test with added rules
66 // "& Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'"
67 void TestDemo3(/* char* par */);
68
69 // perform test with added rules
70 // " & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-' "
71 void TestDemo4(/* char* par */);
72
b75a7d8f
A
73};
74
75#endif /* #if !UCONFIG_NO_COLLATION */
76
77#endif