Lines Matching defs:myCollation
268 static void doTestVariant(UCollator* myCollation, const UChar source[], const UChar target[], UCollationResult result)
279 UColAttributeValue norm = ucol_getAttribute(myCollation, UCOL_NORMALIZATION_MODE, &status);
283 compareResult = ucol_strcoll(myCollation, source, sLen, target, tLen);
288 compareResulta = ucol_strcoll(myCollation, source, -1, target, -1);
296 compareResultIter = ucol_strcollIter(myCollation, &sIter, &tIter, &status);
314 compareResulta = ucol_strcollUTF8(myCollation, utf8Source, utf8SourceLen, utf8Target, utf8TargetLen, &status);
322 compareResulta = ucol_strcollUTF8(myCollation, utf8Source, -1, utf8Target, -1, &status);
338 compareResultUTF8Iter = ucol_strcollIter(myCollation, &sIter, &tIter, &status);
340 ucol_setAttribute(myCollation, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
343 compareResultUTF8IterNorm = ucol_strcollIter(myCollation, &sIter, &tIter, &status);
345 ucol_setAttribute(myCollation, UCOL_NORMALIZATION_MODE, norm, &status);
375 partialSKResult = compareUsingPartials(myCollation, source, sLen, target, tLen, partialSizes[i], &status);
384 ucol_setAttribute(myCollation, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);
385 partialNormalizedSKResult = compareUsingPartials(myCollation, source, sLen, target, tLen, partialSizes[i], &status);
386 ucol_setAttribute(myCollation, UCOL_NORMALIZATION_MODE, norm, &status);
396 sortklen1=ucol_getSortKey(myCollation, source, sLen, NULL, 0);
397 sortklen2=ucol_getSortKey(myCollation, target, tLen, NULL, 0);
405 ucol_getSortKey(myCollation, source, sLen, sortKey1, sortklen1+1);
406 ucol_getSortKey(myCollation, source, -1, sortKey1a, sortklen1+1);
410 ucol_getSortKey(myCollation, target, tLen, sortKey2, sortklen2+1);
411 ucol_getSortKey(myCollation, target, -1, sortKey2a, sortklen2+1);
426 log_verbose("Generated sortkey: %s\n", sortKeyToString(myCollation, sortKey1, buffer, &len));
430 log_verbose("Generated sortkey: %s\n", sortKeyToString(myCollation, sortKey2, buffer, &len));
450 void doTest(UCollator* myCollation, const UChar source[], const UChar target[], UCollationResult result)
452 if(myCollation) {
453 doTestVariant(myCollation, source, target, result);
455 doTestVariant(myCollation, target, source, UCOL_GREATER);
457 doTestVariant(myCollation, target, source, UCOL_LESS);
459 doTestVariant(myCollation, target, source, UCOL_EQUAL);
739 UCollator *myCollation;
746 myCollation=ucol_openRules(rules, len, UCOL_OFF, UCOL_DEFAULT_STRENGTH, NULL, &status);
752 ucol_setStrength(myCollation, UCOL_TERTIARY);
755 doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
757 ucol_close(myCollation);
758 myCollation = 0;
764 UCollator *myCollation;
771 myCollation=ucol_openRules(rules, len, UCOL_OFF, UCOL_DEFAULT_STRENGTH,NULL, &status);
776 ucol_setStrength(myCollation, UCOL_PRIMARY);
781 doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
783 ucol_close(myCollation);
784 myCollation = 0;
791 UCollator *myCollation;
798 myCollation=ucol_openRules(rules, len, UCOL_OFF, UCOL_DEFAULT_STRENGTH,NULL, &status);
803 ucol_setStrength(myCollation, UCOL_SECONDARY);
806 doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
808 ucol_close(myCollation);
809 myCollation = 0;
816 UCollator *myCollation;
823 myCollation=ucol_openRules(rules, len, UCOL_OFF, UCOL_IDENTICAL, NULL,&status);
830 doTest(myCollation, testSourceCases[i], testTargetCases[i], results[i]);
832 ucol_close(myCollation);
833 myCollation = 0;
840 UCollator *myCollation;
847 myCollation=ucol_openRules(rules, len, UCOL_OFF, UCOL_DEFAULT_STRENGTH,NULL, &status);
852 ucol_setStrength(myCollation, UCOL_TERTIARY);
858 doTest(myCollation, testCases[i], testCases[j], UCOL_LESS);
861 ucol_close(myCollation);
862 myCollation = 0;
1025 UCollator *myCollation;
1041 myCollation = ucol_openRules(rules, len, UCOL_OFF,
1053 ucol_setAttribute(myCollation, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED,
1056 if (ucol_getAttribute(myCollation, UCOL_ALTERNATE_HANDLING, &status) !=
1075 len = ucol_getSortKey(myCollation, source, 1, result,
1085 ucol_close(myCollation);
1087 myCollation = NULL;
1103 UCollator *myCollation;
1123 myCollation = ucol_openRules(rules, rlen, UCOL_OFF,
1147 doTest(myCollation, source[count], target[count], UCOL_LESS);
1153 mylen = ucol_getSortKey(myCollation, source[3], 2, myresult, 20);
1160 ucol_close(myCollation);
1162 myCollation = NULL;