]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/g7coll.h
1 /********************************************************************
3 * Copyright (c) 1997-2006, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
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.
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).
18 * Sample Rules: & Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'
19 * Effect : Expansion and contraction can actually be combined.
21 * Sample Rules: & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-'
22 * Effect : sorted sequence as the following,
34 #include "unicode/utypes.h"
36 #if !UCONFIG_NO_COLLATION
38 #include "unicode/tblcoll.h"
41 class G7CollationTest
: public IntlTestCollator
{
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 };
47 enum ETotal_Locales
{ TESTLOCALES
= 12 };
48 enum ETotal_Fixed
{ FIXEDTESTSET
= 15 };
49 enum ETotal_Test
{ TOTALTESTSET
= 30 };
52 virtual ~G7CollationTest();
53 void runIndexedTest( int32_t index
, UBool exec
, const char* &name
, char* par
= NULL
);
56 // perform test for G7 locales
57 void TestG7Locales(/* char* par */);
59 // perform test with added rules " & Z < p, P"
60 void TestDemo1(/* char* par */);
62 // perorm test with added rules "& C < ch , cH, Ch, CH"
63 void TestDemo2(/* char* par */);
65 // perform test with added rules
66 // "& Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'"
67 void TestDemo3(/* char* par */);
69 // perform test with added rules
70 // " & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-' "
71 void TestDemo4(/* char* par */);
75 #endif /* #if !UCONFIG_NO_COLLATION */