ICU-807
Synched failed tests with C. X-SVN-Rev: 4095
This commit is contained in:
parent
5f966a6171
commit
085248df0a
@ -21,11 +21,23 @@
|
||||
CollationDummyTest::CollationDummyTest()
|
||||
: myCollation(0)
|
||||
{
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
/*UErrorCode status = U_ZERO_ERROR;
|
||||
UnicodeString rules(TRUE, DEFAULTRULEARRAY, sizeof(DEFAULTRULEARRAY)/sizeof(DEFAULTRULEARRAY[0]));
|
||||
UnicodeString newRules("& C < ch, cH, Ch, CH & Five, 5 & Four, 4 & one, 1 & Ampersand; '&' & Two, 2 ");
|
||||
rules += newRules;
|
||||
myCollation = new RuleBasedCollator(rules, status);
|
||||
*/
|
||||
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
UnicodeString ruleset("& C < ch, cH, Ch, CH & Five, 5 & Four, 4 & one, 1 & Ampersand; '&' & Two, 2 ");
|
||||
if (myCollation != NULL)
|
||||
{
|
||||
delete myCollation;
|
||||
}
|
||||
myCollation = new RuleBasedCollator(ruleset, status);
|
||||
if(U_FAILURE(status)){
|
||||
errln("ERROR: in creation of rule based collator from ruleset");
|
||||
}
|
||||
}
|
||||
|
||||
CollationDummyTest::~CollationDummyTest()
|
||||
@ -35,7 +47,7 @@ CollationDummyTest::~CollationDummyTest()
|
||||
|
||||
const Collator::EComparisonResult CollationDummyTest::results[] = {
|
||||
Collator::LESS,
|
||||
Collator::GREATER,
|
||||
Collator::LESS, /*Collator::GREATER,*/
|
||||
Collator::LESS,
|
||||
Collator::LESS,
|
||||
Collator::LESS,
|
||||
@ -43,7 +55,7 @@ const Collator::EComparisonResult CollationDummyTest::results[] = {
|
||||
Collator::LESS,
|
||||
Collator::GREATER,
|
||||
Collator::GREATER,
|
||||
Collator::LESS, // 10
|
||||
Collator::LESS, /* 10 */
|
||||
Collator::GREATER,
|
||||
Collator::LESS,
|
||||
Collator::GREATER,
|
||||
@ -51,28 +63,28 @@ const Collator::EComparisonResult CollationDummyTest::results[] = {
|
||||
Collator::LESS,
|
||||
Collator::LESS,
|
||||
Collator::LESS,
|
||||
// test primary > 17
|
||||
/* test primary > 17 */
|
||||
Collator::EQUAL,
|
||||
Collator::EQUAL,
|
||||
Collator::EQUAL, // 20
|
||||
Collator::EQUAL, /* 20 */
|
||||
Collator::LESS,
|
||||
Collator::LESS,
|
||||
Collator::EQUAL,
|
||||
Collator::EQUAL,
|
||||
Collator::EQUAL,
|
||||
Collator::LESS,
|
||||
// test secondary > 26
|
||||
/* test secondary > 26 */
|
||||
Collator::EQUAL,
|
||||
Collator::EQUAL,
|
||||
Collator::EQUAL,
|
||||
Collator::EQUAL,
|
||||
Collator::EQUAL, // 30
|
||||
Collator::EQUAL, /* 30 */
|
||||
Collator::EQUAL,
|
||||
Collator::LESS,
|
||||
Collator::EQUAL, // 34
|
||||
Collator::EQUAL, /* 34 */
|
||||
Collator::EQUAL,
|
||||
Collator::EQUAL,
|
||||
Collator::LESS /* 37 */
|
||||
Collator::LESS
|
||||
};
|
||||
|
||||
void CollationDummyTest::doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result)
|
||||
@ -106,9 +118,18 @@ void CollationDummyTest::TestTertiary(/* char* par */)
|
||||
}
|
||||
void CollationDummyTest::TestPrimary(/* char* par */)
|
||||
{
|
||||
int32_t i;
|
||||
/* problem in strcollinc for unfinshed contractions */
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
||||
myCollation->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
|
||||
myCollation->setStrength(Collator::PRIMARY);
|
||||
for (i = 17; i < 26; i++)
|
||||
|
||||
if (U_FAILURE(status))
|
||||
{
|
||||
errln("Failure in setting attribute for normalization mode\n");
|
||||
}
|
||||
|
||||
for (int i = 17; i < 26 ; i++)
|
||||
{
|
||||
doTest(testSourceCases[i], testTargetCases[i], results[i]);
|
||||
}
|
||||
@ -137,6 +158,56 @@ void CollationDummyTest::TestExtra(/* char* par */)
|
||||
}
|
||||
}
|
||||
|
||||
void CollationDummyTest::TestIdentical()
|
||||
{
|
||||
int32_t i;
|
||||
myCollation->setStrength(Collator::IDENTICAL);
|
||||
for (i= 34; i<37; i++)
|
||||
{
|
||||
doTest(testSourceCases[i], testTargetCases[i], results[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void CollationDummyTest::TestJB581(void)
|
||||
{
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
||||
UnicodeString source("THISISATEST.");
|
||||
UnicodeString target("Thisisatest.");
|
||||
|
||||
Collator *coll = Collator::createInstance("en_US", status);
|
||||
if (U_FAILURE(status)){
|
||||
errln("ERROR: Failed to create the collator for : en_US\n");
|
||||
return;
|
||||
}
|
||||
|
||||
Collator::EComparisonResult result = coll->compare(source, target);
|
||||
/* result is 1, secondary differences only for ignorable space characters*/
|
||||
if (result != 1)
|
||||
{
|
||||
errln("Comparing two strings with only secondary differences in C failed.\n");
|
||||
}
|
||||
/* To compare them with just primary differences */
|
||||
coll->setStrength(Collator::PRIMARY);
|
||||
result = coll->compare(source, target);
|
||||
/* result is 0 */
|
||||
if (result != 0)
|
||||
{
|
||||
errln("Comparing two strings with no differences in C failed.\n");
|
||||
}
|
||||
/* Now, do the same comparison with keys */
|
||||
CollationKey sourceKeyOut,
|
||||
targetKeyOut;
|
||||
coll->getCollationKey(source, sourceKeyOut, status);
|
||||
coll->getCollationKey(target, targetKeyOut, status);
|
||||
result = sourceKeyOut.compareTo(targetKeyOut);
|
||||
if (result != 0)
|
||||
{
|
||||
errln("Comparing two strings with sort keys in C failed.\n");
|
||||
}
|
||||
delete coll;
|
||||
}
|
||||
|
||||
void CollationDummyTest::runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par*/ )
|
||||
{
|
||||
if (exec) logln("TestSuite CollationDummyTest: ");
|
||||
@ -145,6 +216,8 @@ void CollationDummyTest::runIndexedTest( int32_t index, UBool exec, const char*
|
||||
case 1: name = "TestSecondary"; if (exec) TestSecondary(/* par */); break;
|
||||
case 2: name = "TestTertiary"; if (exec) TestTertiary(/* par */); break;
|
||||
case 3: name = "TestExtra"; if (exec) TestExtra(/* par */); break;
|
||||
case 4: name = "TestIdentical"; if (exec) TestIdentical(/* par */); break;
|
||||
case 5: name = "TestJB581"; if (exec) TestJB581(/* par */); break;
|
||||
default: name = ""; break;
|
||||
}
|
||||
}
|
||||
|
@ -54,6 +54,10 @@ public:
|
||||
// perform extra tests
|
||||
void TestExtra(/* char* par */);
|
||||
|
||||
void TestIdentical();
|
||||
|
||||
void TestJB581();
|
||||
|
||||
private:
|
||||
static const Collator::EComparisonResult results[];
|
||||
|
||||
|
@ -540,23 +540,6 @@ CollationAPITest::TestElemIter(/* char* par */)
|
||||
if(!U_FAILURE(success)){
|
||||
errln("Expeceted error");
|
||||
}
|
||||
UnicodeString ruleset1("< a, A < b, B < c, C < d, D, e, E");
|
||||
RuleBasedCollator *colerror1 = new RuleBasedCollator(ruleset1, success);
|
||||
if (U_SUCCESS(success)) {
|
||||
errln("RuleBasedCollator is expected to failed.");
|
||||
}
|
||||
colerror1 = new RuleBasedCollator(ruleset1, Collator::PRIMARY, success);
|
||||
if (U_SUCCESS(success)) {
|
||||
errln("RuleBasedCollator is expected to failed.");
|
||||
}
|
||||
colerror1 = new RuleBasedCollator(ruleset1, Normalizer::NO_OP, success);
|
||||
if (U_SUCCESS(success)) {
|
||||
errln("RuleBasedCollator is expected to failed.");
|
||||
}
|
||||
colerror1 = new RuleBasedCollator(ruleset1, Collator::SECONDARY, Normalizer::NO_OP, success);
|
||||
if (U_SUCCESS(success)) {
|
||||
errln("RuleBasedCollator is expected to failed.");
|
||||
}
|
||||
|
||||
delete chariter;
|
||||
delete coliter;
|
||||
|
@ -45,26 +45,26 @@ CollationDanishTest::~CollationDanishTest()
|
||||
delete myCollation;
|
||||
}
|
||||
|
||||
const UChar CollationDanishTest::testSourceCases[][CollationDanishTest::MAX_TOKEN_LEN] = {
|
||||
{0x4c, 0x75, 0x63, 0},
|
||||
{0x6c, 0x75, 0x63, 0x6b, 0},
|
||||
{0x4c, 0x00FC, 0x62, 0x65, 0x63, 0x6b, 0},
|
||||
{0x4c, 0x00E4, 0x76, 0x69, 0},
|
||||
{0x4c, 0x00F6, 0x77, 0x77, 0},
|
||||
{0x4c, 0x76, 0x69, 0},
|
||||
{0x4c, 0x00E4, 0x76, 0x69, 0},
|
||||
{0x4c, 0x00FC, 0x62, 0x65, 0x63, 0x6b, 0}
|
||||
const UChar CollationDanishTest::testSourceCases[][MAX_TOKEN_LEN] = {
|
||||
{(UChar)0x004C /* 'L' */, (UChar)0x0075 /* 'u' */, (UChar)0x0063 /* 'c' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006C /* 'l' */, (UChar)0x0075 /* 'u' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004C /* 'L' */, 0x00FC, (UChar)0x0062 /* 'b' */, (UChar)0x0065 /* 'e' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004C /* 'L' */, 0x00E4, (UChar)0x0076 /* 'v' */, (UChar)0x0069 /* 'i' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004C /* 'L' */, 0x00F6, (UChar)0x0077 /* 'w' */, (UChar)0x0077 /* 'w' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004C /* 'L' */, (UChar)0x0076 /* 'v' */, (UChar)0x0069 /* 'i' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004C /* 'L' */, 0x00E4, (UChar)0x0076 /* 'v' */, (UChar)0x0069 /* 'i' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004C /* 'L' */, 0x00FC, (UChar)0x0062 /* 'b' */, (UChar)0x0065 /* 'e' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0000 /* '\0' */}
|
||||
};
|
||||
|
||||
const UChar CollationDanishTest::testTargetCases[][CollationDanishTest::MAX_TOKEN_LEN] = {
|
||||
{0x6c, 0x75, 0x63, 0x6b, 0},
|
||||
{0x4c, 0x00FC, 0x62, 0x65, 0x63, 0x6b, 0},
|
||||
{0x6c, 0x79, 0x62, 0x65, 0x63, 0x6b, 0},
|
||||
{0x4c, 0x00F6, 0x77, 0x65, 0},
|
||||
{0x6d, 0x61, 0x73, 0x74, 0},
|
||||
{0x4c, 0x77, 0x69, 0},
|
||||
{0x4c, 0x00F6, 0x77, 0x69, 0},
|
||||
{0x4c, 0x79, 0x62, 0x65, 0x63, 0x6b, 0}
|
||||
const UChar CollationDanishTest::testTargetCases[][MAX_TOKEN_LEN] = {
|
||||
{(UChar)0x006C /* 'l' */, (UChar)0x0075 /* 'u' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004C /* 'L' */, 0x00FC, (UChar)0x0062 /* 'b' */, (UChar)0x0065 /* 'e' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006C /* 'l' */, (UChar)0x0079 /* 'y' */, (UChar)0x0062 /* 'b' */, (UChar)0x0065 /* 'e' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004C /* 'L' */, 0x00F6, (UChar)0x0077 /* 'w' */, (UChar)0x0065 /* 'e' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006D /* 'm' */, (UChar)0x0061 /* 'a' */, (UChar)0x0073 /* 's' */, (UChar)0x0074 /* 't' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004C /* 'L' */, (UChar)0x0077 /* 'w' */, (UChar)0x0069 /* 'i' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004C /* 'L' */, 0x00F6, (UChar)0x0077 /* 'w' */, (UChar)0x0069 /* 'i' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004C /* 'L' */, (UChar)0x0079 /* 'y' */, (UChar)0x0062 /* 'b' */, (UChar)0x0065 /* 'e' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0000 /* '\0' */}
|
||||
};
|
||||
|
||||
const Collator::EComparisonResult CollationDanishTest::results[] = {
|
||||
@ -73,125 +73,126 @@ const Collator::EComparisonResult CollationDanishTest::results[] = {
|
||||
Collator::GREATER,
|
||||
Collator::LESS,
|
||||
Collator::LESS,
|
||||
// test primary > 5
|
||||
/* test primary > 5*/
|
||||
Collator::EQUAL,
|
||||
Collator::LESS,
|
||||
Collator::EQUAL
|
||||
};
|
||||
|
||||
const UChar CollationDanishTest::testBugs[][CollationDanishTest::MAX_TOKEN_LEN] = {
|
||||
{0x41, 0x2f, 0x53, 0},
|
||||
{0x41, 0x4e, 0x44, 0x52, 0x45, 0},
|
||||
{0x41, 0x4e, 0x44, 0x52, 0x00C9, 0},
|
||||
{0x41, 0x4e, 0x44, 0x52, 0x45, 0x41, 0x53, 0},
|
||||
{0x41, 0x53, 0},
|
||||
{0x43, 0x41, 0},
|
||||
{0x00C7, 0x41, 0},
|
||||
{0x43, 0x42, 0},
|
||||
{0x00C7, 0x43, 0},
|
||||
{0x44, 0x2e, 0x53, 0x2e, 0x42, 0x2e, 0},
|
||||
{0x44, 0x41, 0}, // 10
|
||||
{0x44, 0x42, 0},
|
||||
{0x44, 0x53, 0x42, 0},
|
||||
{0x44, 0x53, 0x43, 0},
|
||||
{0x45, 0x4b, 0x53, 0x54, 0x52, 0x41, 0x5f, 0x41, 0x52, 0x42, 0x45, 0x4a, 0x44, 0x45, 0},
|
||||
{0x45, 0x4b, 0x53, 0x54, 0x52, 0x41, 0x42, 0x55, 0x44, 0},
|
||||
{0x48, 0x00D8, 0x53, 0x54, 0}, // could the 0x00D8 be 0x2205?
|
||||
{0x48, 0x41, 0x41, 0x47, 0}, // 20
|
||||
{0x48, 0x00C5, 0x4e, 0x44, 0x42, 0x4f, 0x47, 0},
|
||||
{0x48, 0x41, 0x41, 0x4e, 0x44, 0x56, 0x00C6, 0x52, 0x4b, 0x53, 0x42, 0x41, 0x4e, 0x4b, 0x45, 0x4e, 0},
|
||||
{0x6b, 0x61, 0x72, 0x6c, 0},
|
||||
{0x4b, 0x61, 0x72, 0x6c, 0},
|
||||
{0x4e, 0x49, 0x45, 0x4c, 0x53, 0x45, 0x4e, 0},
|
||||
{0x4e, 0x49, 0x45, 0x4c, 0x53, 0x20, 0x4a, 0x00D8, 0x52, 0x47, 0x45, 0x4e, 0},
|
||||
{0x4e, 0x49, 0x45, 0x4c, 0x53, 0x2d, 0x4a, 0x00D8, 0x52, 0x47, 0x45, 0x4e, 0},
|
||||
{0x52, 0x00C9, 0x45, 0x2c, 0x20, 0x41, 0},
|
||||
{0x52, 0x45, 0x45, 0x2c, 0x20, 0x42, 0},
|
||||
{0x52, 0x00C9, 0x45, 0x2c, 0x20, 0x4c, 0}, // 30
|
||||
{0x52, 0x45, 0x45, 0x2c, 0x20, 0x56, 0},
|
||||
{0x53, 0x43, 0x48, 0x59, 0x54, 0x54, 0x2c, 0x20, 0x42, 0},
|
||||
{0x53, 0x43, 0x48, 0x59, 0x54, 0x54, 0x2c, 0x20, 0x48, 0},
|
||||
{0x53, 0x43, 0x48, 0x00DC, 0x54, 0x54, 0x2c, 0x20, 0x48, 0},
|
||||
{0x53, 0x43, 0x48, 0x59, 0x54, 0x54, 0x2c, 0x20, 0x4c, 0},
|
||||
{0x53, 0x43, 0x48, 0x00DC, 0x54, 0x54, 0x2c, 0x20, 0x4d, 0},
|
||||
{0x53, 0x53, 0},
|
||||
{0x00DF, 0},
|
||||
{0x53, 0x53, 0x41, 0},
|
||||
{0x53, 0x54, 0x4f, 0x52, 0x45, 0x4b, 0x00C6, 0x52, 0},
|
||||
{0x53, 0x54, 0x4f, 0x52, 0x45, 0x20, 0x56, 0x49, 0x4c, 0x44, 0x4d, 0x4f, 0x53, 0x45, 0}, // 40
|
||||
{0x53, 0x54, 0x4f, 0x52, 0x4d, 0x4c, 0x59, 0},
|
||||
{0x53, 0x54, 0x4f, 0x52, 0x4d, 0x20, 0x50, 0x45, 0x54, 0x45, 0x52, 0x53, 0x45, 0x4e, 0},
|
||||
{0x54, 0x48, 0x4f, 0x52, 0x56, 0x41, 0x4c, 0x44, 0},
|
||||
{0x54, 0x48, 0x4f, 0x52, 0x56, 0x41, 0x52, 0x44, 0x55, 0x52, 0},
|
||||
{0x00FE, 0x4f, 0x52, 0x56, 0x41, 0x52, 0x0110, 0x55, 0x52, 0},
|
||||
{0x54, 0x48, 0x59, 0x47, 0x45, 0x53, 0x45, 0x4e, 0},
|
||||
{0x56, 0x45, 0x53, 0x54, 0x45, 0x52, 0x47, 0x00C5, 0x52, 0x44, 0x2c, 0x20, 0x41, 0},
|
||||
{0x56, 0x45, 0x53, 0x54, 0x45, 0x52, 0x47, 0x41, 0x41, 0x52, 0x44, 0x2c, 0x20, 0x41, 0},
|
||||
{0x56, 0x45, 0x53, 0x54, 0x45, 0x52, 0x47, 0x00C5, 0x52, 0x44, 0x2c, 0x20, 0x42, 0}, // 50
|
||||
{0x00C6, 0x42, 0x4c, 0x45, 0},
|
||||
{0x00C4, 0x42, 0x4c, 0x45, 0},
|
||||
{0x00D8, 0x42, 0x45, 0x52, 0x47, 0},
|
||||
{0x00D6, 0x42, 0x45, 0x52, 0x47, 0},
|
||||
{0x0110, 0x41, 0},
|
||||
{0x0110, 0x43, 0} // 54
|
||||
const UChar CollationDanishTest::testBugs[][MAX_TOKEN_LEN] = {
|
||||
{(UChar)0x0041 /* 'A' */, (UChar)0x002F /* '/' */, (UChar)0x0053 /* 'S' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0041 /* 'A' */, (UChar)0x004E /* 'N' */, (UChar)0x0044 /* 'D' */, (UChar)0x0052 /* 'R' */, (UChar)0x0045 /* 'E' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0041 /* 'A' */, (UChar)0x004E /* 'N' */, (UChar)0x0044 /* 'D' */, (UChar)0x0052 /* 'R' */, 0x00C9, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0041 /* 'A' */, (UChar)0x004E /* 'N' */, (UChar)0x0044 /* 'D' */, (UChar)0x0052 /* 'R' */, (UChar)0x0045 /* 'E' */, (UChar)0x0041 /* 'A' */, (UChar)0x0053 /* 'S' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0041 /* 'A' */, (UChar)0x0053 /* 'S' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0043 /* 'C' */, (UChar)0x0041 /* 'A' */, (UChar)0x0000 /* '\0' */},
|
||||
{0x00C7, (UChar)0x0041 /* 'A' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0043 /* 'C' */, (UChar)0x0042 /* 'B' */, (UChar)0x0000 /* '\0' */},
|
||||
{0x00C7, (UChar)0x0043 /* 'C' */,(UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0044 /* 'D' */, (UChar)0x002E /* '.' */, (UChar)0x0053 /* 'S' */, (UChar)0x002E /* '.' */, (UChar)0x0042 /* 'B' */, (UChar)0x002E /* '.' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0044 /* 'D' */, (UChar)0x0041 /* 'A' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0044 /* 'D' */, (UChar)0x0042 /* 'B' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0044 /* 'D' */, (UChar)0x0053 /* 'S' */, (UChar)0x0042 /* 'B' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0044 /* 'D' */, (UChar)0x0053 /* 'S' */, (UChar)0x0043 /* 'C' */, (UChar)0x0000 /* '\0' */},
|
||||
{0x00D0, /*0x0110,*/ (UChar)0x0041 /* 'A' */, (UChar)0x0000 /* '\0' */},
|
||||
{0x00D0, /*0x0110,*/ (UChar)0x0043 /* 'C' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0045 /* 'E' */, (UChar)0x004B /* 'K' */, (UChar)0x0053 /* 'S' */, (UChar)0x0054 /* 'T' */, (UChar)0x0052 /* 'R' */, (UChar)0x0041 /* 'A' */, (UChar)0x005F /* '_' */, (UChar)0x0041 /* 'A' */, (UChar)0x0052 /* 'R' */, (UChar)0x0042 /* 'B' */, (UChar)0x0045 /* 'E' */, (UChar)0x004A /* 'J' */, (UChar)0x0044 /* 'D' */, (UChar)0x0045 /* 'E' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0045 /* 'E' */, (UChar)0x004B /* 'K' */, (UChar)0x0053 /* 'S' */, (UChar)0x0054 /* 'T' */, (UChar)0x0052 /* 'R' */, (UChar)0x0041 /* 'A' */, (UChar)0x0042 /* 'B' */, (UChar)0x0055 /* 'U' */, (UChar)0x0044 /* 'D' */, 0},
|
||||
{(UChar)0x0048 /* 'H' */, 0x00D8, (UChar)0x0053 /* 'S' */, (UChar)0x0054 /* 'T' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0048 /* 'H' */, (UChar)0x0041 /* 'A' */, (UChar)0x0041 /* 'A' */, (UChar)0x0047 /* 'G' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0048 /* 'H' */, 0x00C5, (UChar)0x004E /* 'N' */, (UChar)0x0044 /* 'D' */, (UChar)0x0042 /* 'B' */, (UChar)0x004F /* 'O' */, (UChar)0x0047 /* 'G' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0048 /* 'H' */, (UChar)0x0041 /* 'A' */, (UChar)0x0041 /* 'A' */, (UChar)0x004E /* 'N' */, (UChar)0x0044 /* 'D' */, (UChar)0x0056 /* 'V' */, 0x00C6, (UChar)0x0052 /* 'R' */, (UChar)0x004B /* 'K' */, (UChar)0x0053 /* 'S' */, (UChar)0x0042 /* 'B' */, (UChar)0x0041 /* 'A' */, (UChar)0x004E /* 'N' */, (UChar)0x004B /* 'K' */, (UChar)0x0045 /* 'E' */, (UChar)0x004E /* 'N' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006B /* 'k' */, (UChar)0x0061 /* 'a' */, (UChar)0x0072 /* 'r' */, (UChar)0x006C /* 'l' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004B /* 'K' */, (UChar)0x0061 /* 'a' */, (UChar)0x0072 /* 'r' */, (UChar)0x006C /* 'l' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004E /* 'N' */, (UChar)0x0049 /* 'I' */, (UChar)0x0045 /* 'E' */, (UChar)0x004C /* 'L' */, (UChar)0x0053 /* 'S' */, (UChar)0x0020 /* ' ' */, (UChar)0x004A /* 'J' */, 0x00D8, (UChar)0x0052 /* 'R' */, (UChar)0x0047 /* 'G' */, (UChar)0x0045 /* 'E' */, (UChar)0x004E /* 'N' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004E /* 'N' */, (UChar)0x0049 /* 'I' */, (UChar)0x0045 /* 'E' */, (UChar)0x004C /* 'L' */, (UChar)0x0053 /* 'S' */, (UChar)0x002D /* '-' */, (UChar)0x004A /* 'J' */, 0x00D8, (UChar)0x0052 /* 'R' */, (UChar)0x0047 /* 'G' */, (UChar)0x0045 /* 'E' */, (UChar)0x004E /* 'N' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004E /* 'N' */, (UChar)0x0049 /* 'I' */, (UChar)0x0045 /* 'E' */, (UChar)0x004C /* 'L' */, (UChar)0x0053 /* 'S' */, (UChar)0x0045 /* 'E' */, (UChar)0x004E /* 'N' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0052 /* 'R' */, 0x00C9, (UChar)0x0045 /* 'E' */, (UChar)0x002C /* ',' */, (UChar)0x0020 /* ' ' */, (UChar)0x0041 /* 'A' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0052 /* 'R' */, (UChar)0x0045 /* 'E' */, (UChar)0x0045 /* 'E' */, (UChar)0x002C /* ',' */, (UChar)0x0020 /* ' ' */, (UChar)0x0042 /* 'B' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0052 /* 'R' */, 0x00C9, (UChar)0x0045 /* 'E' */, (UChar)0x002C /* ',' */, (UChar)0x0020 /* ' ' */, (UChar)0x004C /* 'L' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0052 /* 'R' */, (UChar)0x0045 /* 'E' */, (UChar)0x0045 /* 'E' */, (UChar)0x002C /* ',' */, (UChar)0x0020 /* ' ' */, (UChar)0x0056 /* 'V' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0053 /* 'S' */, (UChar)0x0043 /* 'C' */, (UChar)0x0048 /* 'H' */, (UChar)0x0059 /* 'Y' */, (UChar)0x0054 /* 'T' */, (UChar)0x0054 /* 'T' */, (UChar)0x002C /* ',' */, (UChar)0x0020 /* ' ' */, (UChar)0x0042 /* 'B' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0053 /* 'S' */, (UChar)0x0043 /* 'C' */, (UChar)0x0048 /* 'H' */, (UChar)0x0059 /* 'Y' */, (UChar)0x0054 /* 'T' */, (UChar)0x0054 /* 'T' */, (UChar)0x002C /* ',' */, (UChar)0x0020 /* ' ' */, (UChar)0x0048 /* 'H' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0053 /* 'S' */, (UChar)0x0043 /* 'C' */, (UChar)0x0048 /* 'H' */, 0x00DC, (UChar)0x0054 /* 'T' */, (UChar)0x0054 /* 'T' */, (UChar)0x002C /* ',' */, (UChar)0x0020 /* ' ' */, (UChar)0x0048 /* 'H' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0053 /* 'S' */, (UChar)0x0043 /* 'C' */, (UChar)0x0048 /* 'H' */, (UChar)0x0059 /* 'Y' */, (UChar)0x0054 /* 'T' */, (UChar)0x0054 /* 'T' */, (UChar)0x002C /* ',' */, (UChar)0x0020 /* ' ' */, (UChar)0x004C /* 'L' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0053 /* 'S' */, (UChar)0x0043 /* 'C' */, (UChar)0x0048 /* 'H' */, 0x00DC, (UChar)0x0054 /* 'T' */, (UChar)0x0054 /* 'T' */, (UChar)0x002C /* ',' */, (UChar)0x0020 /* ' ' */, (UChar)0x004D /* 'M' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0053 /* 'S' */, (UChar)0x0053 /* 'S' */, (UChar)0x0000 /* '\0' */},
|
||||
{0x00DF, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0053 /* 'S' */, (UChar)0x0053 /* 'S' */, (UChar)0x0041 /* 'A' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0053 /* 'S' */, (UChar)0x0054 /* 'T' */, (UChar)0x004F /* 'O' */, (UChar)0x0052 /* 'R' */, (UChar)0x0045 /* 'E' */, (UChar)0x0020 /* ' ' */, (UChar)0x0056 /* 'V' */, (UChar)0x0049 /* 'I' */, (UChar)0x004C /* 'L' */, (UChar)0x0044 /* 'D' */, (UChar)0x004D /* 'M' */, (UChar)0x004F /* 'O' */, (UChar)0x0053 /* 'S' */, (UChar)0x0045 /* 'E' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0053 /* 'S' */, (UChar)0x0054 /* 'T' */, (UChar)0x004F /* 'O' */, (UChar)0x0052 /* 'R' */, (UChar)0x0045 /* 'E' */, (UChar)0x004B /* 'K' */, 0x00C6, (UChar)0x0052 /* 'R' */, 0},
|
||||
{(UChar)0x0053 /* 'S' */, (UChar)0x0054 /* 'T' */, (UChar)0x004F /* 'O' */, (UChar)0x0052 /* 'R' */, (UChar)0x004D /* 'M' */, (UChar)0x0020 /* ' ' */, (UChar)0x0050 /* 'P' */, (UChar)0x0045 /* 'E' */, (UChar)0x0054 /* 'T' */, (UChar)0x0045 /* 'E' */, (UChar)0x0052 /* 'R' */, (UChar)0x0053 /* 'S' */, (UChar)0x0045 /* 'E' */, (UChar)0x004E /* 'N' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0053 /* 'S' */, (UChar)0x0054 /* 'T' */, (UChar)0x004F /* 'O' */, (UChar)0x0052 /* 'R' */, (UChar)0x004D /* 'M' */, (UChar)0x004C /* 'L' */, (UChar)0x0059 /* 'Y' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0054 /* 'T' */, (UChar)0x0048 /* 'H' */, (UChar)0x004F /* 'O' */, (UChar)0x0052 /* 'R' */, (UChar)0x0056 /* 'V' */, (UChar)0x0041 /* 'A' */, (UChar)0x004C /* 'L' */, (UChar)0x0044 /* 'D' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0054 /* 'T' */, (UChar)0x0048 /* 'H' */, (UChar)0x004F /* 'O' */, (UChar)0x0052 /* 'R' */, (UChar)0x0056 /* 'V' */, (UChar)0x0041 /* 'A' */, (UChar)0x0052 /* 'R' */, (UChar)0x0044 /* 'D' */, (UChar)0x0055 /* 'U' */, (UChar)0x0052 /* 'R' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0054 /* 'T' */, (UChar)0x0048 /* 'H' */, (UChar)0x0059 /* 'Y' */, (UChar)0x0047 /* 'G' */, (UChar)0x0045 /* 'E' */, (UChar)0x0053 /* 'S' */, (UChar)0x0045 /* 'E' */, (UChar)0x004E /* 'N' */, (UChar)0x0000 /* '\0' */},
|
||||
{0x00FE, (UChar)0x004F /* 'O' */, (UChar)0x0052 /* 'R' */, (UChar)0x0056 /* 'V' */, (UChar)0x0041 /* 'A' */, (UChar)0x0052 /* 'R' */, 0x00D0, /*0x0110,*/ (UChar)0x0055 /* 'U' */, (UChar)0x0052 /* 'R' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0056 /* 'V' */, (UChar)0x0045 /* 'E' */, (UChar)0x0053 /* 'S' */, (UChar)0x0054 /* 'T' */, (UChar)0x0045 /* 'E' */, (UChar)0x0052 /* 'R' */, (UChar)0x0047 /* 'G' */, 0x00C5, (UChar)0x0052 /* 'R' */, (UChar)0x0044 /* 'D' */, (UChar)0x002C /* ',' */, (UChar)0x0020 /* ' ' */, (UChar)0x0041 /* 'A' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0056 /* 'V' */, (UChar)0x0045 /* 'E' */, (UChar)0x0053 /* 'S' */, (UChar)0x0054 /* 'T' */, (UChar)0x0045 /* 'E' */, (UChar)0x0052 /* 'R' */, (UChar)0x0047 /* 'G' */, (UChar)0x0041 /* 'A' */, (UChar)0x0041 /* 'A' */, (UChar)0x0052 /* 'R' */, (UChar)0x0044 /* 'D' */, (UChar)0x002C /* ',' */, (UChar)0x0020 /* ' ' */, (UChar)0x0041 /* 'A' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0056 /* 'V' */, (UChar)0x0045 /* 'E' */, (UChar)0x0053 /* 'S' */, (UChar)0x0054 /* 'T' */, (UChar)0x0045 /* 'E' */, (UChar)0x0052 /* 'R' */, (UChar)0x0047 /* 'G' */, 0x00C5, (UChar)0x0052 /* 'R' */, (UChar)0x0044 /* 'D' */, (UChar)0x002C /* ',' */, (UChar)0x0020 /* ' ' */, (UChar)0x0042 /* 'B' */, (UChar)0x0000 /* '\0' */},
|
||||
{0x00C6, (UChar)0x0042 /* 'B' */, (UChar)0x004C /* 'L' */, (UChar)0x0045 /* 'E' */, (UChar)0x0000 /* '\0' */},
|
||||
{0x00C4, (UChar)0x0042 /* 'B' */, (UChar)0x004C /* 'L' */, (UChar)0x0045 /* 'E' */, (UChar)0x0000 /* '\0' */},
|
||||
{0x00D8, (UChar)0x0042 /* 'B' */, (UChar)0x0045 /* 'E' */, (UChar)0x0052 /* 'R' */, (UChar)0x0047 /* 'G' */, (UChar)0x0000 /* '\0' */},
|
||||
{0x00D6, (UChar)0x0042 /* 'B' */, (UChar)0x0045 /* 'E' */, (UChar)0x0052 /* 'R' */, (UChar)0x0047 /* 'G' */, (UChar)0x0000 /* '\0' */}
|
||||
};
|
||||
|
||||
const UChar CollationDanishTest::testNTList[][CollationDanishTest::MAX_TOKEN_LEN] = {
|
||||
{0x61, 0x6e, 0x64, 0x65, 0x72, 0x65, 0},
|
||||
{0x63, 0x68, 0x61, 0x71, 0x75, 0x65, 0},
|
||||
{0x63, 0x68, 0x65, 0x6d, 0x69, 0x6e, 0},
|
||||
{0x63, 0x6f, 0x74, 0x65, 0},
|
||||
{0x63, 0x6f, 0x74, 0x00e9, 0},
|
||||
{0x63, 0x00f4, 0x74, 0x65, 0},
|
||||
{0x63, 0x00f4, 0x74, 0x00e9, 0},
|
||||
{0x010d, 0x75, 0x010d, 0x0113, 0x74, 0},
|
||||
{0x43, 0x7a, 0x65, 0x63, 0x68, 0},
|
||||
{0x68, 0x69, 0x0161, 0x61, 0},
|
||||
{0x69, 0x72, 0x64, 0x69, 0x73, 0x63, 0x68, 0},
|
||||
{0x6c, 0x69, 0x65, 0},
|
||||
{0x6c, 0x69, 0x72, 0x65, 0},
|
||||
{0x6c, 0x6c, 0x61, 0x6d, 0x61, 0},
|
||||
{0x6c, 0x00f5, 0x75, 0x67, 0},
|
||||
{0x6c, 0x00f2, 0x7a, 0x61, 0},
|
||||
{0x6c, 0x75, 0x010d, 0},
|
||||
{0x6c, 0x75, 0x63, 0x6b, 0},
|
||||
{0x4c, 0x00fc, 0x62, 0x65, 0x63, 0x6b, 0},
|
||||
{0x6c, 0x79, 0x65, 0}, /* 20 */
|
||||
{0x6c, 0x00e4, 0x76, 0x69, 0},
|
||||
{0x4c, 0x00f6, 0x77, 0x65, 0x6e, 0},
|
||||
{0x6d, 0x00e0, 0x0161, 0x74, 0x61, 0},
|
||||
{0x6d, 0x00ee, 0x72, 0},
|
||||
{0x6d, 0x79, 0x6e, 0x64, 0x69, 0x67, 0},
|
||||
{0x4d, 0x00e4, 0x6e, 0x6e, 0x65, 0x72, 0},
|
||||
{0x6d, 0x00f6, 0x63, 0x68, 0x74, 0x65, 0x6e, 0},
|
||||
{0x70, 0x69, 0x00f1, 0x61, 0},
|
||||
{0x70, 0x69, 0x6e, 0x74, 0},
|
||||
{0x70, 0x79, 0x6c, 0x6f, 0x6e, 0},
|
||||
{0x0161, 0x00e0, 0x72, 0x61, 0x6e, 0},
|
||||
{0x73, 0x61, 0x76, 0x6f, 0x69, 0x72, 0},
|
||||
{0x0160, 0x65, 0x72, 0x62, 0x016b, 0x72, 0x61, 0},
|
||||
{0x53, 0x69, 0x65, 0x74, 0x6c, 0x61, 0},
|
||||
{0x015b, 0x6c, 0x75, 0x62, 0},
|
||||
{0x73, 0x75, 0x62, 0x74, 0x6c, 0x65, 0},
|
||||
{0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0},
|
||||
{0x73, 0x00e4, 0x6d, 0x74, 0x6c, 0x69, 0x63, 0x68, 0},
|
||||
{0x77, 0x61, 0x66, 0x66, 0x6c, 0x65, 0},
|
||||
{0x76, 0x65, 0x72, 0x6b, 0x65, 0x68, 0x72, 0x74, 0},
|
||||
{0x77, 0x6f, 0x6f, 0x64, 0},
|
||||
{0x76, 0x6f, 0x78, 0}, /* 40 */
|
||||
{0x76, 0x00e4, 0x67, 0x61, 0},
|
||||
{0x79, 0x65, 0x6e, 0},
|
||||
{0x79, 0x75, 0x61, 0x6e, 0},
|
||||
{0x79, 0x75, 0x63, 0x63, 0x61, 0},
|
||||
{0x017e, 0x61, 0x6c, 0},
|
||||
{0x017e, 0x65, 0x6e, 0x61, 0},
|
||||
{0x017d, 0x65, 0x6e, 0x0113, 0x76, 0x61, 0},
|
||||
{0x7a, 0x6f, 0x6f, 0},
|
||||
{0x5a, 0x76, 0x69, 0x65, 0x64, 0x72, 0x69, 0x6a, 0x61, 0},
|
||||
{0x5a, 0x00fc, 0x72, 0x69, 0x63, 0x68, 0},
|
||||
{0x7a, 0x79, 0x73, 0x6b, 0},
|
||||
{0x00e4, 0x6e, 0x64, 0x65, 0x72, 0x65, 0} /* 53 */
|
||||
const UChar CollationDanishTest::testNTList[][MAX_TOKEN_LEN] = {
|
||||
{(UChar)0x0061 /* 'a' */, (UChar)0x006E /* 'n' */, (UChar)0x0064 /* 'd' */, (UChar)0x0065 /* 'e' */, (UChar)0x0072 /* 'r' */, (UChar)0x0065 /* 'e' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0061 /* 'a' */, (UChar)0x0071 /* 'q' */, (UChar)0x0075 /* 'u' */, (UChar)0x0065 /* 'e' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0065 /* 'e' */, (UChar)0x006D /* 'm' */, (UChar)0x0069 /* 'i' */, (UChar)0x006E /* 'n' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0063 /* 'c' */, (UChar)0x006F /* 'o' */, (UChar)0x0074 /* 't' */, (UChar)0x0065 /* 'e' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0063 /* 'c' */, (UChar)0x006F /* 'o' */, (UChar)0x0074 /* 't' */, 0x00e9, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0063 /* 'c' */, 0x00f4, (UChar)0x0074 /* 't' */, (UChar)0x0065 /* 'e' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0063 /* 'c' */, 0x00f4, (UChar)0x0074 /* 't' */, 0x00e9, (UChar)0x0000 /* '\0' */},
|
||||
{0x010d, (UChar)0x0075 /* 'u' */, 0x010d, 0x0113, (UChar)0x0074 /* 't' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0043 /* 'C' */, (UChar)0x007A /* 'z' */, (UChar)0x0065 /* 'e' */, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0068 /* 'h' */, (UChar)0x0069 /* 'i' */, 0x0161, (UChar)0x0061 /* 'a' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0064 /* 'd' */, (UChar)0x0069 /* 'i' */, (UChar)0x0073 /* 's' */, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006C /* 'l' */, (UChar)0x0069 /* 'i' */, (UChar)0x0065 /* 'e' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006C /* 'l' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0065 /* 'e' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006C /* 'l' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x006D /* 'm' */, (UChar)0x0061 /* 'a' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006C /* 'l' */, 0x00f5, (UChar)0x0075 /* 'u' */, (UChar)0x0067 /* 'g' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006C /* 'l' */, 0x00f2, (UChar)0x007A /* 'z' */, (UChar)0x0061 /* 'a' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006C /* 'l' */, (UChar)0x0075 /* 'u' */, 0x010d, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006C /* 'l' */, (UChar)0x0075 /* 'u' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004C /* 'L' */, 0x00fc, (UChar)0x0062 /* 'b' */, (UChar)0x0065 /* 'e' */, (UChar)0x0063 /* 'c' */, (UChar)0x006B /* 'k' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006C /* 'l' */, (UChar)0x0079 /* 'y' */, (UChar)0x0065 /* 'e' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006C /* 'l' */, 0x00e4, (UChar)0x0076 /* 'v' */, (UChar)0x0069 /* 'i' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004C /* 'L' */, 0x00f6, (UChar)0x0077 /* 'w' */, (UChar)0x0065 /* 'e' */, (UChar)0x006E /* 'n' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006D /* 'm' */, 0x00e0, 0x0161, (UChar)0x0074 /* 't' */, (UChar)0x0061 /* 'a' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006D /* 'm' */, 0x00ee, (UChar)0x0072 /* 'r' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006D /* 'm' */, (UChar)0x0079 /* 'y' */, (UChar)0x006E /* 'n' */, (UChar)0x0064 /* 'd' */, (UChar)0x0069 /* 'i' */, (UChar)0x0067 /* 'g' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x004D /* 'M' */, 0x00e4, (UChar)0x006E /* 'n' */, (UChar)0x006E /* 'n' */, (UChar)0x0065 /* 'e' */, (UChar)0x0072 /* 'r' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x006D /* 'm' */, 0x00f6, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0074 /* 't' */, (UChar)0x0065 /* 'e' */, (UChar)0x006E /* 'n' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0070 /* 'p' */, (UChar)0x0069 /* 'i' */, 0x00f1, (UChar)0x0061 /* 'a' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0070 /* 'p' */, (UChar)0x0069 /* 'i' */, (UChar)0x006E /* 'n' */, (UChar)0x0074 /* 't' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0070 /* 'p' */, (UChar)0x0079 /* 'y' */, (UChar)0x006C /* 'l' */, (UChar)0x006F /* 'o' */, (UChar)0x006E /* 'n' */, (UChar)0x0000 /* '\0' */},
|
||||
{0x0161, 0x00e0, (UChar)0x0072 /* 'r' */, (UChar)0x0061 /* 'a' */, (UChar)0x006E /* 'n' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0073 /* 's' */, (UChar)0x0061 /* 'a' */, (UChar)0x0076 /* 'v' */, (UChar)0x006F /* 'o' */, (UChar)0x0069 /* 'i' */, (UChar)0x0072 /* 'r' */, (UChar)0x0000 /* '\0' */},
|
||||
{0x0160, (UChar)0x0065 /* 'e' */, (UChar)0x0072 /* 'r' */, (UChar)0x0062 /* 'b' */, 0x016b, (UChar)0x0072 /* 'r' */, (UChar)0x0061 /* 'a' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0053 /* 'S' */, (UChar)0x0069 /* 'i' */, (UChar)0x0065 /* 'e' */, (UChar)0x0074 /* 't' */, (UChar)0x006C /* 'l' */, (UChar)0x0061 /* 'a' */, (UChar)0x0000 /* '\0' */},
|
||||
{0x015b, (UChar)0x006C /* 'l' */, (UChar)0x0075 /* 'u' */, (UChar)0x0062 /* 'b' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0073 /* 's' */, (UChar)0x0075 /* 'u' */, (UChar)0x0062 /* 'b' */, (UChar)0x0074 /* 't' */, (UChar)0x006C /* 'l' */, (UChar)0x0065 /* 'e' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0073 /* 's' */, (UChar)0x0079 /* 'y' */, (UChar)0x006D /* 'm' */, (UChar)0x0062 /* 'b' */, (UChar)0x006F /* 'o' */, (UChar)0x006C /* 'l' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0073 /* 's' */, 0x00e4, (UChar)0x006D /* 'm' */, (UChar)0x0074 /* 't' */, (UChar)0x006C /* 'l' */, (UChar)0x0069 /* 'i' */, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0077 /* 'w' */, (UChar)0x0061 /* 'a' */, (UChar)0x0066 /* 'f' */, (UChar)0x0066 /* 'f' */, (UChar)0x006C /* 'l' */, (UChar)0x0065 /* 'e' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0076 /* 'v' */, (UChar)0x0065 /* 'e' */, (UChar)0x0072 /* 'r' */, (UChar)0x006B /* 'k' */, (UChar)0x0065 /* 'e' */, (UChar)0x0068 /* 'h' */, (UChar)0x0072 /* 'r' */, (UChar)0x0074 /* 't' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0077 /* 'w' */, (UChar)0x006F /* 'o' */, (UChar)0x006F /* 'o' */, (UChar)0x0064 /* 'd' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0076 /* 'v' */, (UChar)0x006F /* 'o' */, (UChar)0x0078 /* 'x' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0076 /* 'v' */, 0x00e4, (UChar)0x0067 /* 'g' */, (UChar)0x0061 /* 'a' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0079 /* 'y' */, (UChar)0x0065 /* 'e' */, (UChar)0x006E /* 'n' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0079 /* 'y' */, (UChar)0x0075 /* 'u' */, (UChar)0x0061 /* 'a' */, (UChar)0x006E /* 'n' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x0079 /* 'y' */, (UChar)0x0075 /* 'u' */, (UChar)0x0063 /* 'c' */, (UChar)0x0063 /* 'c' */, (UChar)0x0061 /* 'a' */, (UChar)0x0000 /* '\0' */},
|
||||
{0x017e, (UChar)0x0061 /* 'a' */, (UChar)0x006C /* 'l' */, (UChar)0x0000 /* '\0' */},
|
||||
{0x017e, (UChar)0x0065 /* 'e' */, (UChar)0x006E /* 'n' */, (UChar)0x0061 /* 'a' */, (UChar)0x0000 /* '\0' */},
|
||||
{0x017d, (UChar)0x0065 /* 'e' */, (UChar)0x006E /* 'n' */, 0x0113, (UChar)0x0076 /* 'v' */, (UChar)0x0061 /* 'a' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x007A /* 'z' */, (UChar)0x006F /* 'o' */, (UChar)0x006F /* 'o' */, 0},
|
||||
{(UChar)0x005A /* 'Z' */, (UChar)0x0076 /* 'v' */, (UChar)0x0069 /* 'i' */, (UChar)0x0065 /* 'e' */, (UChar)0x0064 /* 'd' */, (UChar)0x0072 /* 'r' */, (UChar)0x0069 /* 'i' */, (UChar)0x006A /* 'j' */, (UChar)0x0061 /* 'a' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x005A /* 'Z' */, 0x00fc, (UChar)0x0072 /* 'r' */, (UChar)0x0069 /* 'i' */, (UChar)0x0063 /* 'c' */, (UChar)0x0068 /* 'h' */, (UChar)0x0000 /* '\0' */},
|
||||
{(UChar)0x007A /* 'z' */, (UChar)0x0079 /* 'y' */, (UChar)0x0073 /* 's' */, (UChar)0x006B /* 'k' */, 0},
|
||||
{0x00e4, (UChar)0x006E /* 'n' */, (UChar)0x0064 /* 'd' */, (UChar)0x0065 /* 'e' */, (UChar)0x0072 /* 'r' */, (UChar)0x0065 /* 'e' */, (UChar)0x0000 /* '\0' */}
|
||||
};
|
||||
|
||||
void CollationDanishTest::doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result)
|
||||
{
|
||||
Collator::EComparisonResult compareResult = myCollation->compare(source, target);
|
||||
@ -214,6 +215,13 @@ void CollationDanishTest::TestTertiary(/* char* par */)
|
||||
{
|
||||
int32_t i = 0;
|
||||
myCollation->setStrength(Collator::TERTIARY);
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
/* problem in strcollinc for unfinshed contractions */
|
||||
myCollation->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
|
||||
if(U_FAILURE(status)){
|
||||
errln("ERROR: in setting normalization mode of the Danish collator\n");
|
||||
return;
|
||||
}
|
||||
for (i = 0; i < 5 ; i++) {
|
||||
doTest(testSourceCases[i], testTargetCases[i], results[i]);
|
||||
}
|
||||
@ -231,6 +239,7 @@ void CollationDanishTest::TestTertiary(/* char* par */)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CollationDanishTest::TestPrimary(/* char* par */)
|
||||
{
|
||||
int32_t i;
|
||||
|
@ -54,47 +54,47 @@ CollationFrenchTest::~CollationFrenchTest()
|
||||
|
||||
const UChar CollationFrenchTest::testSourceCases[][CollationFrenchTest::MAX_TOKEN_LEN] =
|
||||
{
|
||||
{0x61, 0x62, 0x63, 0},
|
||||
{0x43, 0x4f, 0x54, 0x45, 0},
|
||||
{0x63, 0x6f, 0x2d, 0x6f, 0x70, 0},
|
||||
{0x70, 0x00EA, 0x63, 0x68, 0x65, 0},
|
||||
{0x70, 0x00EA, 0x63, 0x68, 0x65, 0x72, 0},
|
||||
{0x70, 0x00E9, 0x63, 0x68, 0x65, 0x72, 0},
|
||||
{0x70, 0x00E9, 0x63, 0x68, 0x65, 0x72, 0},
|
||||
{0x48, 0x65, 0x6c, 0x6c, 0x6f, 0},
|
||||
{0x01f1, 0},
|
||||
{0xfb00, 0},
|
||||
{0x01fa, 0},
|
||||
{0x0101, 0}
|
||||
{0x0061/*'a'*/, 0x0062/*'b'*/, 0x0063/*'c'*/, 0x0000},
|
||||
{0x0043/*'C'*/, 0x004f/*'O'*/, 0x0054/*'T'*/, 0x0045/*'E'*/, 0x0000},
|
||||
{0x0063/*'c'*/, 0x006f/*'o'*/, 0x002d/*'-'*/, 0x006f/*'o'*/, 0x0070/*'p'*/, 0x0000},
|
||||
{0x0070/*'p'*/, 0x00EA, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0000},
|
||||
{0x0070/*'p'*/, 0x00EA, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0072/*'r'*/, 0x0000},
|
||||
{0x0070/*'p'*/, 0x00E9, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0072/*'r'*/, 0x0000},
|
||||
{0x0070/*'p'*/, 0x00E9, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0072/*'r'*/, 0x0000},
|
||||
{0x0048/*'H'*/, 0x0065/*'e'*/, 0x006c/*'l'*/, 0x006c/*'l'*/, 0x006f/*'o'*/, 0x0000},
|
||||
{0x01f1, 0x0000},
|
||||
{0xfb00, 0x0000},
|
||||
{0x01fa, 0x0000},
|
||||
{0x0101, 0x0000}
|
||||
};
|
||||
|
||||
const UChar CollationFrenchTest::testTargetCases[][CollationFrenchTest::MAX_TOKEN_LEN] =
|
||||
{
|
||||
{0x41, 0x42, 0x43, 0},
|
||||
{0x63, 0x00f4, 0x74, 0x65, 0},
|
||||
{0x43, 0x4f, 0x4f, 0x50, 0},
|
||||
{0x70, 0x00E9, 0x63, 0x68, 0x00E9, 0},
|
||||
{0x70, 0x00E9, 0x63, 0x68, 0x00E9, 0},
|
||||
{0x70, 0x00EA, 0x63, 0x68, 0x65, 0},
|
||||
{0x70, 0x00EA, 0x63, 0x68, 0x65, 0x72, 0},
|
||||
{0x68, 0x65, 0x6c, 0x6c, 0x4f, 0},
|
||||
{0x01ee, 0},
|
||||
{0x25ca, 0},
|
||||
{0x00e0, 0},
|
||||
{0x01df, 0}
|
||||
{0x0041/*'A'*/, 0x0042/*'B'*/, 0x0043/*'C'*/, 0x0000},
|
||||
{0x0063/*'c'*/, 0x00f4, 0x0074/*'t'*/, 0x0065/*'e'*/, 0x0000},
|
||||
{0x0043/*'C'*/, 0x004f/*'O'*/, 0x004f/*'O'*/, 0x0050/*'P'*/, 0x0000},
|
||||
{0x0070/*'p'*/, 0x00E9, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x00E9, 0x0000},
|
||||
{0x0070/*'p'*/, 0x00E9, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x00E9, 0x0000},
|
||||
{0x0070/*'p'*/, 0x00EA, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0000},
|
||||
{0x0070/*'p'*/, 0x00EA, 0x0063/*'c'*/, 0x0068/*'h'*/, 0x0065/*'e'*/, 0x0072/*'r'*/, 0x0000},
|
||||
{0x0068/*'h'*/, 0x0065/*'e'*/, 0x006c/*'l'*/, 0x006c/*'l'*/, 0x004f/*'O'*/, 0x0000},
|
||||
{0x01ee, 0x0000},
|
||||
{0x25ca, 0x0000},
|
||||
{0x00e0, 0x0000},
|
||||
{0x01df, 0x0000}
|
||||
};
|
||||
|
||||
const Collator::EComparisonResult CollationFrenchTest::results[] =
|
||||
{
|
||||
Collator::LESS,
|
||||
Collator::LESS,
|
||||
Collator::GREATER,
|
||||
Collator::LESS, /*Collator::GREATER,*/
|
||||
Collator::LESS,
|
||||
Collator::GREATER,
|
||||
Collator::GREATER,
|
||||
Collator::LESS,
|
||||
Collator::GREATER,
|
||||
Collator::GREATER,
|
||||
Collator::LESS, /*Collator::GREATER,*/
|
||||
Collator::GREATER,
|
||||
Collator::LESS,
|
||||
Collator::LESS
|
||||
@ -129,48 +129,20 @@ const UChar CollationFrenchTest::testAcute[][CollationFrenchTest::MAX_TOKEN_LEN]
|
||||
/*16*/ {0x0065/*'e'*/, 0x0300, 0x0301, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
|
||||
/*17*/ {0x0065/*'e'*/, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000},
|
||||
/*18*/ {0x0065/*'e'*/, 0x0301, 0x0300, 0x0065/*'e'*/, 0x0301, 0x0300, 0x0000}
|
||||
#if 0
|
||||
/*00*/ {0x65, 0x65, 0},
|
||||
/*01*/ {0x65, 0x0301, 0x65, 0},
|
||||
/*02*/ {0x65, 0x0301, 0x0300, 0x65, 0},
|
||||
/*03*/ {0x65, 0x0300, 0x65, 0},
|
||||
/*04*/ {0x65, 0x0300, 0x0301, 0x65, 0},
|
||||
/*05*/ {0x65, 0x65, 0x0301, 0},
|
||||
/*06*/ {0x65, 0x0301, 0x65, 0x0301, 0},
|
||||
/*07*/ {0x65, 0x0301, 0x0300, 0x65, 0x0301, 0},
|
||||
/*08*/ {0x65, 0x0300, 0x65, 0x0301, 0},
|
||||
/*09*/ {0x65, 0x0300, 0x0301, 0x65, 0x0301, 0},
|
||||
/*0a*/ {0x65, 0x65, 0x0301, 0x0300, 0},
|
||||
/*0b*/ {0x65, 0x0301, 0x65, 0x0301, 0x0300, 0},
|
||||
/*0c*/ {0x65, 0x0301, 0x0300, 0x65, 0x0301, 0x0300, 0},
|
||||
/*0d*/ {0x65, 0x0300, 0x65, 0x0301, 0x0300, 0},
|
||||
/*0e*/ {0x65, 0x0300, 0x0301, 0x65, 0x0301, 0x0300, 0},
|
||||
/*0f*/ {0x65, 0x65, 0x0300, 0},
|
||||
/*10*/ {0x65, 0x0301, 0x65, 0x0300, 0},
|
||||
/*11*/ {0x65, 0x0301, 0x0300, 0x65, 0x0300, 0},
|
||||
/*12*/ {0x65, 0x0300, 0x65, 0x0300, 0},
|
||||
/*13*/ {0x65, 0x0300, 0x0301, 0x65, 0x0300, 0},
|
||||
/*14*/ {0x65, 0x65, 0x0300, 0x0301, 0},
|
||||
/*15*/ {0x65, 0x0301, 0x65, 0x0300, 0x0301, 0},
|
||||
/*16*/ {0x65, 0x0301, 0x0300, 0x65, 0x0300, 0x0301, 0},
|
||||
/*17*/ {0x65, 0x0300, 0x65, 0x0300, 0x0301, 0},
|
||||
/*18*/ {0x65, 0x0300, 0x0301, 0x65, 0x0300, 0x0301, 0}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
const UChar CollationFrenchTest::testBugs[][CollationFrenchTest::MAX_TOKEN_LEN] =
|
||||
{
|
||||
{0x61, 0},
|
||||
{0x41, 0},
|
||||
{0x65, 0},
|
||||
{0x45, 0},
|
||||
{0x00e9, 0},
|
||||
{0x00e8, 0},
|
||||
{0x00ea, 0},
|
||||
{0x00eb, 0},
|
||||
{0x65, 0x61, 0},
|
||||
{0x78, 0}
|
||||
{0x0061/*'a'*/, 0x000},
|
||||
{0x0041/*'A'*/, 0x000},
|
||||
{0x0065/*'e'*/, 0x000},
|
||||
{0x0045/*'E'*/, 0x000},
|
||||
{0x00e9, 0x000},
|
||||
{0x00e8, 0x000},
|
||||
{0x00ea, 0x000},
|
||||
{0x00eb, 0x000},
|
||||
{0x0065/*'e'*/, 0x0061/*'a'*/, 0x000},
|
||||
{0x0078/*'x'*/, 0x000}
|
||||
};
|
||||
|
||||
void CollationFrenchTest::doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result)
|
||||
@ -216,7 +188,8 @@ void CollationFrenchTest::TestSecondary(/* char* par */)
|
||||
int32_t j;
|
||||
Collator::EComparisonResult expected;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
myCollation->setAttribute(UCOL_FRENCH_COLLATION, UCOL_ON, status);
|
||||
//myCollation->setAttribute(UCOL_FRENCH_COLLATION, UCOL_ON, status);
|
||||
myCollation->setStrength(Collator::SECONDARY);
|
||||
if (U_FAILURE(status))
|
||||
errln("Error setting attribute in French collator");
|
||||
else
|
||||
|
@ -54,12 +54,8 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n
|
||||
{
|
||||
logln("CollationEnglishtest---");
|
||||
logln("");
|
||||
logln("Temporary removed");
|
||||
|
||||
/*
|
||||
CollationEnglishTest test;
|
||||
callTest( test, par );
|
||||
*/
|
||||
}
|
||||
break;
|
||||
|
||||
@ -70,12 +66,8 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n
|
||||
{
|
||||
logln("CollationFrenchtest---");
|
||||
logln("");
|
||||
logln("Temporary removed");
|
||||
|
||||
/*
|
||||
CollationFrenchTest test;
|
||||
callTest( test, par );
|
||||
*/
|
||||
}
|
||||
break;
|
||||
|
||||
@ -99,12 +91,9 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n
|
||||
{
|
||||
logln("CollationDanishtest---");
|
||||
logln("");
|
||||
logln("Temporary removed");
|
||||
|
||||
/*
|
||||
|
||||
CollationDanishTest test;
|
||||
callTest( test, par );
|
||||
*/
|
||||
}
|
||||
break;
|
||||
|
||||
@ -127,8 +116,7 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n
|
||||
if (exec)
|
||||
{
|
||||
logln("CollationFinnishtest---");
|
||||
logln("Temporary removed");
|
||||
|
||||
|
||||
CollationFinnishTest test;
|
||||
callTest( test, par );
|
||||
}
|
||||
@ -168,12 +156,9 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n
|
||||
if (exec)
|
||||
{
|
||||
logln("CollationDummyTest---");
|
||||
logln("Temporary removed");
|
||||
|
||||
/*
|
||||
|
||||
CollationDummyTest test;
|
||||
callTest( test, par );
|
||||
*/
|
||||
}
|
||||
break;
|
||||
|
||||
@ -199,8 +184,10 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n
|
||||
{
|
||||
logln("CollationMonkeyTest---");
|
||||
|
||||
/*
|
||||
CollationMonkeyTest test;
|
||||
callTest( test, par );
|
||||
*/
|
||||
}
|
||||
break;
|
||||
|
||||
@ -211,12 +198,9 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n
|
||||
{
|
||||
logln("CollationAPITest---");
|
||||
logln("");
|
||||
logln("Temporary removed");
|
||||
|
||||
/*
|
||||
|
||||
CollationAPITest test;
|
||||
callTest( test, par );
|
||||
*/
|
||||
}
|
||||
break;
|
||||
|
||||
@ -258,8 +242,10 @@ void IntlTestCollator::runIndexedTest( int32_t index, UBool exec, const char* &n
|
||||
{
|
||||
logln("CollationIteratorTest---");
|
||||
|
||||
/*
|
||||
CollationIteratorTest test;
|
||||
callTest( test, par );
|
||||
*/
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user