1ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/******************************************************************** 2ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * COPYRIGHT: 385bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho * Copyright (c) 1997-2009, International Business Machines Corporation and 4ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru * others. All Rights Reserved. 5ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru ********************************************************************/ 6ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 7ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#include "unicode/utypes.h" 8ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 9ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#if !UCONFIG_NO_COLLATION 10ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 11ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#include "unicode/coll.h" 12ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#include "unicode/tblcoll.h" 13ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#include "unicode/unistr.h" 14ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#include "unicode/sortkey.h" 15ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#include "jacoll.h" 16ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 17ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#include "sfwdchit.h" 18ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 19ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruCollationKanaTest::CollationKanaTest() 20ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru: myCollation(0) 21ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru{ 22ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru UErrorCode status = U_ZERO_ERROR; 23ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru myCollation = Collator::createInstance(Locale::getJapan(), status); 24ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru if(!myCollation || U_FAILURE(status)) { 2585bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho errcheckln(status, __FILE__ "failed to create! err " + UnicodeString(u_errorName(status))); 26ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /* if it wasn't already: */ 27ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru delete myCollation; 28ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru myCollation = NULL; 29ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru return; 30ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru } 31ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru} 32ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 33ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste QueruCollationKanaTest::~CollationKanaTest() 34ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru{ 35ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru delete myCollation; 36ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru} 37ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 38ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruconst UChar CollationKanaTest::testSourceCases[][CollationKanaTest::MAX_TOKEN_LEN] = { 39ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0xff9E, 0x0000}, 40ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x3042, 0x0000}, 41ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30A2, 0x0000}, 42ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x3042, 0x3042, 0x0000}, 43ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30A2, 0x30FC, 0x0000}, 44ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30A2, 0x30FC, 0x30C8, 0x0000} /* 6 */ 45ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}; 46ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 47ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruconst UChar CollationKanaTest::testTargetCases[][CollationKanaTest::MAX_TOKEN_LEN] = { 48ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0xFF9F, 0x0000}, 49ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30A2, 0x0000}, 50ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x3042, 0x3042, 0x0000}, 51ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30A2, 0x30FC, 0x0000}, 52ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30A2, 0x30FC, 0x30C8, 0x0000}, 53ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x3042, 0x3042, 0x3068, 0x0000} /* 6 */ 54ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}; 55ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 56ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruconst Collator::EComparisonResult CollationKanaTest::results[] = { 57ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru Collator::LESS, 58ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru Collator::EQUAL, //Collator::LESS, /* Katakanas and Hiraganas are equal on tertiary level(ICU 2.0)*/ 59ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru Collator::LESS, 60ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru Collator::GREATER, // Collator::LESS, /* Prolonged sound mark sorts BEFORE equivalent vowel (ICU 2.0)*/ 61ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru Collator::LESS, 62ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru Collator::LESS, //Collator::GREATER /* Prolonged sound mark sorts BEFORE equivalent vowel (ICU 2.0)*//* 6 */ 63ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}; 64ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 65ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruconst UChar CollationKanaTest::testBaseCases[][CollationKanaTest::MAX_TOKEN_LEN] = { 66ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30AB, 0x0000}, 67ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30AB, 0x30AD, 0x0000}, 68ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30AD, 0x0000}, 69ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30AD, 0x30AD, 0x0000} 70ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}; 71ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 72ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruconst UChar CollationKanaTest::testPlainDakutenHandakutenCases[][CollationKanaTest::MAX_TOKEN_LEN] = { 73ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30CF, 0x30AB, 0x0000}, 74ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30D0, 0x30AB, 0x0000}, 75ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30CF, 0x30AD, 0x0000}, 76ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30D0, 0x30AD, 0x0000} 77ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}; 78ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 79ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruconst UChar CollationKanaTest::testSmallLargeCases[][CollationKanaTest::MAX_TOKEN_LEN] = { 80ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30C3, 0x30CF, 0x0000}, 81ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30C4, 0x30CF, 0x0000}, 82ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30C3, 0x30D0, 0x0000}, 83ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30C4, 0x30D0, 0x0000} 84ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}; 85ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 86ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruconst UChar CollationKanaTest::testKatakanaHiraganaCases[][CollationKanaTest::MAX_TOKEN_LEN] = { 87ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x3042, 0x30C3, 0x0000}, 88ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30A2, 0x30C3, 0x0000}, 89ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x3042, 0x30C4, 0x0000}, 90ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru {0x30A2, 0x30C4, 0x0000} 91ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}; 92ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 93ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruconst UChar CollationKanaTest::testChooonKigooCases[][CollationKanaTest::MAX_TOKEN_LEN] = { 94ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /*0*/ {0x30AB, 0x30FC, 0x3042, 0x0000}, 95ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /*1*/ {0x30AB, 0x30FC, 0x30A2, 0x0000}, 96ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /*2*/ {0x30AB, 0x30A4, 0x3042, 0x0000}, 97ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /*3*/ {0x30AB, 0x30A4, 0x30A2, 0x0000}, 98ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /*6*/ {0x30AD, 0x30FC, 0x3042, 0x0000}, /* Prolonged sound mark sorts BEFORE equivalent vowel (ICU 2.0)*/ 99ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /*7*/ {0x30AD, 0x30FC, 0x30A2, 0x0000}, /* Prolonged sound mark sorts BEFORE equivalent vowel (ICU 2.0)*/ 100ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /*4*/ {0x30AD, 0x30A4, 0x3042, 0x0000}, 101ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /*5*/ {0x30AD, 0x30A4, 0x30A2, 0x0000}, 102ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru}; 103ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 104ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruvoid CollationKanaTest::TestTertiary(/* char* par */) 105ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru{ 106ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru int32_t i = 0; 107ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru UErrorCode status = U_ZERO_ERROR; 108ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru myCollation->setStrength(Collator::TERTIARY); 109ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /* for one case, strcollinc fails, since it doesn't have good handling of contractions*/ 110ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru /* normalization is turned off to stop strcollinc from executing */ 111ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru myCollation->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status); 112ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru myCollation->setAttribute(UCOL_CASE_LEVEL, UCOL_ON, status); 113ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru for (i = 0; i < 6; i++) { 114ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]); 115ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru } 116ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru} 117ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 118ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/* Testing base letters */ 119ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruvoid CollationKanaTest::TestBase() 120ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru{ 121ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru int32_t i; 122ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru myCollation->setStrength(Collator::PRIMARY); 123ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru for (i = 0; i < 3 ; i++) 124ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru doTest(myCollation, testBaseCases[i], testBaseCases[i + 1], Collator::LESS); 125ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru} 126ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 127ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/* Testing plain, Daku-ten, Handaku-ten letters */ 128ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruvoid CollationKanaTest::TestPlainDakutenHandakuten(void) 129ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru{ 130ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru int32_t i; 131ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru myCollation->setStrength(Collator::SECONDARY); 132ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru for (i = 0; i < 3 ; i++) 133ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru doTest(myCollation, testPlainDakutenHandakutenCases[i], testPlainDakutenHandakutenCases[i + 1], 134ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru Collator::LESS); 135ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru} 136ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 137ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/* 138ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* Test Small, Large letters 139ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru*/ 140ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruvoid CollationKanaTest::TestSmallLarge(void) 141ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru{ 142ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru int32_t i; 143ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru UErrorCode status = U_ZERO_ERROR; 144ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru myCollation->setStrength(Collator::TERTIARY); 145ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru myCollation->setAttribute(UCOL_CASE_LEVEL, UCOL_ON, status); 146ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru for (i = 0; i < 3 ; i++) 147ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru doTest(myCollation, testSmallLargeCases[i], testSmallLargeCases[i + 1], Collator::LESS); 148ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru} 149ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 150ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/* 151ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* Test Katakana, Hiragana letters 152ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru*/ 153ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruvoid CollationKanaTest::TestKatakanaHiragana(void) 154ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru{ 155ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru int32_t i; 156ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru UErrorCode status = U_ZERO_ERROR; 157ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru myCollation->setStrength(Collator::QUATERNARY); 158ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru myCollation->setAttribute(UCOL_CASE_LEVEL, UCOL_ON, status); 159ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru for (i = 0; i < 3 ; i++) { 160ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru doTest(myCollation, testKatakanaHiraganaCases[i], testKatakanaHiraganaCases[i + 1], 161ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru Collator::LESS); 162ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru } 163ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru} 164ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 165ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru/* 166ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru* Test Choo-on kigoo 167ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru*/ 168ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruvoid CollationKanaTest::TestChooonKigoo(void) 169ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru{ 170ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru int32_t i; 171ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru UErrorCode status = U_ZERO_ERROR; 172ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru myCollation->setStrength(Collator::QUATERNARY); 173ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru myCollation->setAttribute(UCOL_CASE_LEVEL, UCOL_ON, status); 174ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru for (i = 0; i < 7 ; i++) { 175ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru doTest(myCollation, testChooonKigooCases[i], testChooonKigooCases[i + 1], Collator::LESS); 176ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru } 177ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru} 178ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 179ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 180ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queruvoid CollationKanaTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ ) 181ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru{ 182ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru if (exec) logln("TestSuite CollationKanaTest: "); 183ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru if(myCollation) { 184ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru switch (index) { 185ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru case 0: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break; 186ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru case 1: name = "TestBase"; if (exec) TestBase(/* par */); break; 187ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru case 2: name = "TestSmallLarge"; if (exec) TestSmallLarge(/* par */); break; 188ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru case 3: name = "TestTestPlainDakutenHandakuten"; if (exec) TestPlainDakutenHandakuten(/* par */); break; 189ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru case 4: name = "TestKatakanaHiragana"; if (exec) TestKatakanaHiragana(/* par */); break; 190ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru case 5: name = "TestChooonKigoo"; if (exec) TestChooonKigoo(/* par */); break; 191ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru default: name = ""; break; 192ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru } 193ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru } else { 19485bf2e2fbc60a9f938064abc8127d61da7d19882Claire Ho dataerrln("Collator couldn't be instantiated!"); 195ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru name = ""; 196ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru } 197ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru} 198ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru 199ac04d0bbe12b3ef54518635711412f178cb4d16Jean-Baptiste Queru#endif /* #if !UCONFIG_NO_COLLATION */ 200