Lines Matching refs:collator
161 static UCollator *getCollator(const char *collator) in getCollator() argument
163 if (collator == NULL) { in getCollator()
166 if (strcmp(collator, "fr") == 0) { in getCollator()
169 else if (strcmp(collator, "de") == 0) { in getCollator()
172 else if (strcmp(collator, "es") == 0) { in getCollator()
549 UCollator *collator = getCollator(search.collator); in assertEqual() local
557 ucol_setStrength(collator, search.strength); in assertEqual()
558 strsrch = usearch_openFromCollator(pattern, -1, text, -1, collator, in assertEqual()
566 ucol_setStrength(collator, UCOL_TERTIARY); in assertEqual()
570 ucol_setStrength(collator, UCOL_TERTIARY); in assertEqual()
580 UCollator *collator = getCollator(search.collator); in assertCanonicalEqual() local
588 ucol_setStrength(collator, search.strength); in assertCanonicalEqual()
589 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in assertCanonicalEqual()
590 strsrch = usearch_openFromCollator(pattern, -1, text, -1, collator, in assertCanonicalEqual()
601 ucol_setStrength(collator, UCOL_TERTIARY); in assertCanonicalEqual()
608 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, UCOL_OFF, &status); in assertCanonicalEqual()
609 ucol_setStrength(collator, UCOL_TERTIARY); in assertCanonicalEqual()
621 UCollator *collator = getCollator(search.collator); in assertEqualWithAttribute() local
628 ucol_setStrength(collator, search.strength); in assertEqualWithAttribute()
629 strsrch = usearch_openFromCollator(pattern, -1, text, -1, collator, in assertEqualWithAttribute()
641 ucol_setStrength(collator, UCOL_TERTIARY); in assertEqualWithAttribute()
645 ucol_setStrength(collator, UCOL_TERTIARY); in assertEqualWithAttribute()
777 UCollator *collator = getCollator(search->collator); in TestBreakIterator() local
782 ucol_setStrength(collator, search->strength); in TestBreakIterator()
784 strsrch = usearch_openFromCollator(pattern, -1, text, -1, collator, in TestBreakIterator()
794 ucol_setStrength(collator, UCOL_TERTIARY); in TestBreakIterator()
884 UCollator *collator = getCollator(search->collator); in TestOverlap() local
890 strsrch = usearch_openFromCollator(pattern, -1, text, -1, collator, in TestOverlap()
1657 UCollator *collator; in TestContraction() local
1666 collator = ucol_openRules(rules, u_strlen(rules), UCOL_ON, in TestContraction()
1675 strsrch = usearch_openFromCollator(pattern, 1, text, 1, collator, NULL, in TestContraction()
1692 ucol_close(collator); in TestContraction()
1700 UCollator *collator; in TestIgnorable() local
1710 collator = ucol_openRules(rules, u_strlen(rules), UCOL_ON, in TestIgnorable()
1719 strsrch = usearch_openFromCollator(pattern, 1, text, 1, collator, NULL, in TestIgnorable()
1736 ucol_close(collator); in TestIgnorable()
1760 if (search.collator != NULL) { in TestDiacriticMatch()
1761 coll = ucol_openFromShortString(search.collator, FALSE, NULL, &status); in TestDiacriticMatch()
1768 …log_err("Error opening string search collator(\"%s\") %s\n", search.collator, u_errorName(status)); in TestDiacriticMatch()
1867 UCollator *collator = getCollator(search->collator); in TestBreakIteratorCanonical() local
1873 ucol_setStrength(collator, search->strength); in TestBreakIteratorCanonical()
1875 strsrch = usearch_openFromCollator(pattern, -1, text, -1, collator, in TestBreakIteratorCanonical()
1893 ucol_setStrength(collator, UCOL_TERTIARY); in TestBreakIteratorCanonical()
1985 UCollator *collator = getCollator(search->collator); in TestOverlapCanonical() local
1991 strsrch = usearch_openFromCollator(pattern, -1, text, -1, collator, in TestOverlapCanonical()
2271 UCollator *collator; in TestGetSetOffsetCanonical() local
2284 collator = usearch_getCollator(strsrch); in TestGetSetOffsetCanonical()
2285 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, UCOL_ON, &status); in TestGetSetOffsetCanonical()
2357 ucol_setAttribute(collator, UCOL_NORMALIZATION_MODE, UCOL_OFF, &status); in TestGetSetOffsetCanonical()
2385 UCollator *collator = NULL; in TestContractionCanonical() local
2394 collator = ucol_openRules(rules, u_strlen(rules), UCOL_ON, in TestContractionCanonical()
2403 strsrch = usearch_openFromCollator(pattern, 1, text, 1, collator, NULL, in TestContractionCanonical()
2423 ucol_close(collator); in TestContractionCanonical()