summaryrefslogtreecommitdiff
path: root/Build/source/libs/icu/icu-50.1/test/intltest/jacoll.h
blob: 96a6ae1fd7ec4afd86cd3deef12f378c21290a90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/********************************************************************
 * COPYRIGHT: 
 * Copyright (c) 1997-2003, International Business Machines Corporation and
 * others. All Rights Reserved.
 ********************************************************************/

/**
 * CollationKanaTest is a third level test class.  This tests the locale
 * specific tertiary rules.  For example, the term 'A-' (/u3041/u30fc) is 
 * equivalent to 'AA' (/u3041/u3041).
 */

#ifndef _JACOLL
#define _JACOLL

#include "unicode/utypes.h"

#if !UCONFIG_NO_COLLATION

#include "tscoll.h"

class CollationKanaTest: public IntlTestCollator {
public:
    // If this is too small for the test data, just increase it.
    // Just don't make it too large, otherwise the executable will get too big
    enum EToken_Len { MAX_TOKEN_LEN = 16 };

    CollationKanaTest();
    virtual ~CollationKanaTest();
    void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );

    // performs test with strength TERIARY
    void TestTertiary(/* char* par */);

    /* Testing base letters */
    void TestBase();

    /* Testing plain, Daku-ten, Handaku-ten letters */
    void TestPlainDakutenHandakuten();

    /* Test Small, Large letters */
    void TestSmallLarge();

    /* Test Katakana, Hiragana letters */
    void TestKatakanaHiragana();

    /* Test Choo-on kigoo */
    void TestChooonKigoo();

private:
    static const UChar testSourceCases[][MAX_TOKEN_LEN];
    static const UChar testTargetCases[][MAX_TOKEN_LEN];
    static const Collator::EComparisonResult results[];
    static const UChar testBaseCases[][MAX_TOKEN_LEN];
    static const UChar testPlainDakutenHandakutenCases[][MAX_TOKEN_LEN];
    static const UChar testSmallLargeCases[][MAX_TOKEN_LEN];
    static const UChar testKatakanaHiraganaCases[][MAX_TOKEN_LEN];
    static const UChar testChooonKigooCases[][MAX_TOKEN_LEN];

    Collator *myCollation;
};

#endif /* #if !UCONFIG_NO_COLLATION */

#endif