1ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/********************************************************************
2ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * COPYRIGHT:
3ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * Copyright (c) 1997-2003, International Business Machines Corporation and
4ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * others. All Rights Reserved.
5ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru ********************************************************************/
6ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
7ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/**
8ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * CollationKanaTest is a third level test class.  This tests the locale
9ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * specific tertiary rules.  For example, the term 'A-' (/u3041/u30fc) is
10ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * equivalent to 'AA' (/u3041/u3041).
11ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru */
12ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
13ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#ifndef _JACOLL
14ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#define _JACOLL
15ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
16ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#include "unicode/utypes.h"
17ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
18ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#if !UCONFIG_NO_COLLATION
19ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
20ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#include "tscoll.h"
21ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
22ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruclass CollationKanaTest: public IntlTestCollator {
23ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Querupublic:
24ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    // If this is too small for the test data, just increase it.
25ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    // Just don't make it too large, otherwise the executable will get too big
26ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    enum EToken_Len { MAX_TOKEN_LEN = 16 };
27ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
28ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    CollationKanaTest();
29ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    virtual ~CollationKanaTest();
30ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
31ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
32ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    // performs test with strength TERIARY
33ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    void TestTertiary(/* char* par */);
34ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
35ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /* Testing base letters */
36ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    void TestBase();
37ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
38ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /* Testing plain, Daku-ten, Handaku-ten letters */
39ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    void TestPlainDakutenHandakuten();
40ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
41ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /* Test Small, Large letters */
42ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    void TestSmallLarge();
43ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
44ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /* Test Katakana, Hiragana letters */
45ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    void TestKatakanaHiragana();
46ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
47ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    /* Test Choo-on kigoo */
48ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    void TestChooonKigoo();
49ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
50ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruprivate:
51ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    static const UChar testSourceCases[][MAX_TOKEN_LEN];
52ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    static const UChar testTargetCases[][MAX_TOKEN_LEN];
53ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    static const Collator::EComparisonResult results[];
54ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    static const UChar testBaseCases[][MAX_TOKEN_LEN];
55ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    static const UChar testPlainDakutenHandakutenCases[][MAX_TOKEN_LEN];
56ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    static const UChar testSmallLargeCases[][MAX_TOKEN_LEN];
57ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    static const UChar testKatakanaHiraganaCases[][MAX_TOKEN_LEN];
58ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    static const UChar testChooonKigooCases[][MAX_TOKEN_LEN];
59ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
60ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru    Collator *myCollation;
61ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru};
62ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
63ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#endif /* #if !UCONFIG_NO_COLLATION */
64ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru
65ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#endif
66