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