]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/g7coll.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-2006, International Business Machines Corporation and
6 * others. All Rights Reserved.
7 ********************************************************************/
10 * G7CollationTest is a third level test class. This test performs the examples
11 * mentioned on the IBM Java international demos web site.
12 * Sample Rules: & Z < p , P
13 * Effect : Making P sort after Z.
15 * Sample Rules: & c < ch , cH, Ch, CH
16 * Effect : As well as adding sequences of characters that act as a single character (this is
17 * known as contraction), you can also add characters that act like a sequence of
18 * characters (this is known as expansion).
20 * Sample Rules: & Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'
21 * Effect : Expansion and contraction can actually be combined.
23 * Sample Rules: & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-'
24 * Effect : sorted sequence as the following,
36 #include "unicode/utypes.h"
38 #if !UCONFIG_NO_COLLATION
40 #include "unicode/tblcoll.h"
43 class G7CollationTest
: public IntlTestCollator
{
45 // If this is too small for the test data, just increase it.
46 // Just don't make it too large, otherwise the executable will get too big
47 enum EToken_Len
{ MAX_TOKEN_LEN
= 16 };
49 enum ETotal_Locales
{ TESTLOCALES
= 12 };
50 enum ETotal_Fixed
{ FIXEDTESTSET
= 15 };
51 enum ETotal_Test
{ TOTALTESTSET
= 30 };
54 virtual ~G7CollationTest();
55 void runIndexedTest( int32_t index
, UBool exec
, const char* &name
, char* par
= NULL
);
58 // perform test for G7 locales
59 void TestG7Locales(/* char* par */);
61 // perform test with added rules " & Z < p, P"
62 void TestDemo1(/* char* par */);
64 // perorm test with added rules "& C < ch , cH, Ch, CH"
65 void TestDemo2(/* char* par */);
67 // perform test with added rules
68 // "& Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'"
69 void TestDemo3(/* char* par */);
71 // perform test with added rules
72 // " & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-' "
73 void TestDemo4(/* char* par */);
77 #endif /* #if !UCONFIG_NO_COLLATION */