98 order = 1; |
98 order = 1; |
99 |
99 |
100 test(order == desired_order); |
100 test(order == desired_order); |
101 } |
101 } |
102 |
102 |
|
103 #undef USE_SWEDISH_TABLE |
|
104 #ifdef USE_SWEDISH_TABLE |
103 static const TUint32 TheSwedishKey[] = |
105 static const TUint32 TheSwedishKey[] = |
104 { |
106 { |
105 0x8f60109,0x8f70109,0x8f80109,0x8f60121,0x8f70121,0x8f80121,0x8dd0109,0x8dd0121, |
107 0x8f60109,0x8f70109,0x8f80109,0x8f60121,0x8f70121,0x8f80121,0x8dd0109,0x8dd0121, |
106 0x8c50121,0x8c50109, |
108 0x8c50121,0x8c50109, |
107 }; |
109 }; |
126 static const TCollationKeyTable TheSwedishTable = |
128 static const TCollationKeyTable TheSwedishTable = |
127 { TheSwedishKey, TheSwedishIndex, 2, TheSwedishStringElement, TheSwedishStringIndex, 8 }; |
129 { TheSwedishKey, TheSwedishIndex, 2, TheSwedishStringElement, TheSwedishStringIndex, 8 }; |
128 |
130 |
129 static const TCollationMethod TheSwedishMethod = |
131 static const TCollationMethod TheSwedishMethod = |
130 { 0, NULL, &TheSwedishTable, 0 }; |
132 { 0, NULL, &TheSwedishTable, 0 }; |
|
133 #endif |
131 |
134 |
132 static const TCollationMethod TheSwapCaseMethod = |
135 static const TCollationMethod TheSwapCaseMethod = |
133 { 0, NULL, NULL, TCollationMethod::ESwapCase }; |
136 { 0, NULL, NULL, TCollationMethod::ESwapCase }; |
134 |
137 |
135 static const TUint32 TheKanaKey[] = |
138 static const TUint32 TheKanaKey[] = |
33135 test_unicode_collation(_L("Liege"),_L("Li\xe8ge"),-1); // unaccented before accented... |
33138 test_unicode_collation(_L("Liege"),_L("Li\xe8ge"),-1); // unaccented before accented... |
33136 test_unicode_collation(_L("Liege"),_L("Li\xe8ge"),-1,1); // accents are significant at level 1 |
33139 test_unicode_collation(_L("Liege"),_L("Li\xe8ge"),-1,1); // accents are significant at level 1 |
33137 test_unicode_collation(_L("Liege"),_L("li\xe8ge"),-1); // accentuation outweighs case |
33140 test_unicode_collation(_L("Liege"),_L("li\xe8ge"),-1); // accentuation outweighs case |
33138 test_unicode_collation(_L("Liege"),_L("li\xe8ge"),0,0); // ignore accents and case at level 0 |
33141 test_unicode_collation(_L("Liege"),_L("li\xe8ge"),0,0); // ignore accents and case at level 0 |
33139 test_unicode_collation(_L("\xe5ngstr\xf6m"),_L("zoo"),-1); // a-ring before z by default |
33142 test_unicode_collation(_L("\xe5ngstr\xf6m"),_L("zoo"),-1); // a-ring before z by default |
33140 // test_unicode_collation(_L("\xe5ngstr\xf6m"),_L("zoo"),1,3,&TheSwedishMethod); // a-ring after z in Sweden |
33143 #undef USE_SWEDISH_TABLE |
|
33144 #ifdef USE_SWEDISH_TABLE |
|
33145 test_unicode_collation(_L("\xe5ngstr\xf6m"),_L("zoo"),1,3,&TheSwedishMethod); // a-ring after z in Sweden |
|
33146 #endif |
33141 test_unicode_collation(_L("Antidisestablishmentarian"),_L("antidisestablishmentariac"),1); // long strings that don't have identical prefixes |
33147 test_unicode_collation(_L("Antidisestablishmentarian"),_L("antidisestablishmentariac"),1); // long strings that don't have identical prefixes |
33142 |
33148 |
33143 test_unicode_collation(_L("\xFF86"),_L(""),1); |
33149 test_unicode_collation(_L("\xFF86"),_L(""),1); |
33144 test_unicode_collation(_L("\x30B9"),_L(""),1); |
33150 test_unicode_collation(_L("\x30B9"),_L(""),1); |
33145 // Equality |
33151 // Equality |