]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/lcukocol.cpp
1 /********************************************************************
3 * Copyright (c) 1997-2003, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
7 #include "unicode/utypes.h"
9 #if !UCONFIG_NO_COLLATION
12 #include "unicode/coll.h"
16 #include "unicode/tblcoll.h"
20 #include "unicode/unistr.h"
24 #include "unicode/sortkey.h"
31 LotusCollationKoreanTest::LotusCollationKoreanTest()
34 UErrorCode status
= U_ZERO_ERROR
;
35 myCollation
= Collator::createInstance("ko_kr", status
);
36 if(U_SUCCESS(status
)) {
37 myCollation
->setAttribute(UCOL_NORMALIZATION_MODE
, UCOL_ON
, status
);
39 errln("Couldn't instantiate the collator with %s", u_errorName(status
));
46 LotusCollationKoreanTest::~LotusCollationKoreanTest()
51 const UChar
LotusCollationKoreanTest::testSourceCases
[][LotusCollationKoreanTest::MAX_TOKEN_LEN
] = {
56 const UChar
LotusCollationKoreanTest::testTargetCases
[][LotusCollationKoreanTest::MAX_TOKEN_LEN
] = {
60 const Collator::EComparisonResult
LotusCollationKoreanTest::results
[] = {
64 void LotusCollationKoreanTest::TestTertiary(/* char* par */)
67 myCollation
->setStrength(Collator::TERTIARY
);
69 for (i
= 0; i
< 1; i
++) {
70 doTest(myCollation
, testSourceCases
[i
], testTargetCases
[i
], results
[i
]);
74 void LotusCollationKoreanTest::runIndexedTest( int32_t index
, UBool exec
, const char* &name
, char* /*par*/ )
76 if (exec
) logln("TestSuite LotusCollationKoreanTest: ");
79 case 0: name
= "TestTertiary"; if (exec
) TestTertiary(/* par */); break;
80 default: name
= ""; break;
83 errln("Class collator not instantiated");
88 #endif /* #if !UCONFIG_NO_COLLATION */