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