• Home
  • Raw
  • Download

Lines Matching refs:search

350                                           const SearchData     search)  in assertEqualWithUStringSearch()  argument
354 int32_t matchindex = search.offset[count]; in assertEqualWithUStringSearch()
361 usearch_setAttribute(strsrch, USEARCH_ELEMENT_COMPARISON, search.elemCompare, &status); in assertEqualWithUStringSearch()
373 matchlength = search.size[count]; in assertEqualWithUStringSearch()
396 matchindex = search.offset[count]; in assertEqualWithUStringSearch()
412 matchindex = search.offset[count]; in assertEqualWithUStringSearch()
415 matchlength = search.size[count]; in assertEqualWithUStringSearch()
437 matchindex = count > 0 ? search.offset[count - 1] : -1; in assertEqualWithUStringSearch()
458 matchindex = search.offset[count]; in assertEqualWithUStringSearch()
480 matchlength = search.size[count]; in assertEqualWithUStringSearch()
502 matchindex = search.offset[count]; in assertEqualWithUStringSearch()
507 while (search.offset[count + 1] >= 0) { in assertEqualWithUStringSearch()
531 matchindex = search.offset[count]; in assertEqualWithUStringSearch()
532 matchlength = search.size[count]; in assertEqualWithUStringSearch()
555 static UBool assertEqual(const SearchData search) in assertEqual() argument
560 UCollator *collator = getCollator(search.collator); in assertEqual()
561 UBreakIterator *breaker = getBreakIterator(search.breaker); in assertEqual()
564 CHECK_BREAK_BOOL(search.breaker); in assertEqual()
566 u_unescape(search.text, text, 128); in assertEqual()
567 u_unescape(search.pattern, pattern, 32); in assertEqual()
568 ucol_setStrength(collator, search.strength); in assertEqual()
576 if (!assertEqualWithUStringSearch(strsrch, search)) { in assertEqual()
586 static UBool assertCanonicalEqual(const SearchData search) in assertCanonicalEqual() argument
591 UCollator *collator = getCollator(search.collator); in assertCanonicalEqual()
592 UBreakIterator *breaker = getBreakIterator(search.breaker); in assertCanonicalEqual()
596 CHECK_BREAK_BOOL(search.breaker); in assertCanonicalEqual()
597 u_unescape(search.text, text, 128); in assertCanonicalEqual()
598 u_unescape(search.pattern, pattern, 32); in assertCanonicalEqual()
599 ucol_setStrength(collator, search.strength); in assertCanonicalEqual()
611 if (!assertEqualWithUStringSearch(strsrch, search)) { in assertCanonicalEqual()
625 static UBool assertEqualWithAttribute(const SearchData search, in assertEqualWithAttribute() argument
632 UCollator *collator = getCollator(search.collator); in assertEqualWithAttribute()
633 UBreakIterator *breaker = getBreakIterator(search.breaker); in assertEqualWithAttribute()
636 CHECK_BREAK_BOOL(search.breaker); in assertEqualWithAttribute()
637 u_unescape(search.text, text, 128); in assertEqualWithAttribute()
638 u_unescape(search.pattern, pattern, 32); in assertEqualWithAttribute()
639 ucol_setStrength(collator, search.strength); in assertEqualWithAttribute()
651 if (!assertEqualWithUStringSearch(strsrch, search)) { in assertEqualWithAttribute()
787 const SearchData *search = &(BREAKITERATOREXACT[count]); in TestBreakIterator() local
788 UCollator *collator = getCollator(search->collator); in TestBreakIterator()
789 UBreakIterator *breaker = getBreakIterator(search->breaker); in TestBreakIterator()
791 u_unescape(search->text, text, 128); in TestBreakIterator()
792 u_unescape(search->pattern, pattern, 32); in TestBreakIterator()
793 ucol_setStrength(collator, search->strength); in TestBreakIterator()
804 if (!assertEqualWithUStringSearch(strsrch, *search)) { in TestBreakIterator()
809 search = &(BREAKITERATOREXACT[count + 1]); in TestBreakIterator()
810 breaker = getBreakIterator(search->breaker); in TestBreakIterator()
818 if (!assertEqualWithUStringSearch(strsrch, *search)) { in TestBreakIterator()
894 const SearchData *search = &(OVERLAP[count]); in TestOverlap() local
895 UCollator *collator = getCollator(search->collator); in TestOverlap()
899 u_unescape(search->text, text, 128); in TestOverlap()
900 u_unescape(search->pattern, pattern, 32); in TestOverlap()
915 if (!assertEqualWithUStringSearch(strsrch, *search)) { in TestOverlap()
919 search = &(NONOVERLAP[count]); in TestOverlap()
926 if (!assertEqualWithUStringSearch(strsrch, *search)) { in TestOverlap()
1257 SearchData search = BASIC[searchDataIndex ++]; in TestGetSetOffset() local
1258 int32_t matchindex = search.offset[count]; in TestGetSetOffset()
1261 u_unescape(search.text, text, 128); in TestGetSetOffset()
1262 u_unescape(search.pattern, pattern, 32); in TestGetSetOffset()
1266 ucol_setStrength(usearch_getCollator(strsrch), search.strength); in TestGetSetOffset()
1269 int32_t matchlength = search.size[count]; in TestGetSetOffset()
1298 matchindex = search.offset[count + 1] == -1 ? -1 : in TestGetSetOffset()
1299 search.offset[count + 2]; in TestGetSetOffset()
1300 if (search.offset[count + 1] != -1) { in TestGetSetOffset()
1301 usearch_setOffset(strsrch, search.offset[count + 1] + 1, in TestGetSetOffset()
1303 if (usearch_getOffset(strsrch) != search.offset[count + 1] + 1) { in TestGetSetOffset()
1420 SearchData search = MATCH[0]; in TestGetMatch() local
1421 int32_t matchindex = search.offset[count]; in TestGetMatch()
1438 u_unescape(search.text, text, 128); in TestGetMatch()
1439 u_unescape(search.pattern, pattern, 32); in TestGetMatch()
1451 int32_t matchlength = search.size[count]; in TestGetMatch()
1497 matchindex = search.offset[count]; in TestGetMatch()
1524 SearchData search = MATCH[count]; in TestSetMatch() local
1536 u_unescape(search.text, text, 128); in TestSetMatch()
1537 u_unescape(search.pattern, pattern, 32); in TestSetMatch()
1549 while (search.offset[size] != -1) { in TestSetMatch()
1553 if (usearch_first(strsrch, &status) != search.offset[0] || in TestSetMatch()
1557 if (usearch_last(strsrch, &status) != search.offset[size -1] || in TestSetMatch()
1564 if (usearch_following(strsrch, search.offset[offsetIndex + 2] - 1, in TestSetMatch()
1565 &status) != search.offset[offsetIndex + 2] || in TestSetMatch()
1568 search.offset[offsetIndex + 2] - 1); in TestSetMatch()
1572 if (usearch_preceding(strsrch, search.offset[offsetIndex + 1] + in TestSetMatch()
1573 search.size[offsetIndex + 1] + 1, in TestSetMatch()
1574 &status) != search.offset[offsetIndex + 1] || in TestSetMatch()
1577 search.offset[offsetIndex + 1] + 1); in TestSetMatch()
1758 SearchData search; in TestDiacriticMatch() local
1769 search = DIACRITICMATCH[count]; in TestDiacriticMatch()
1770 while (search.text != NULL) { in TestDiacriticMatch()
1771 if (search.collator != NULL) { in TestDiacriticMatch()
1772 coll = ucol_openFromShortString(search.collator, false, NULL, &status); in TestDiacriticMatch()
1776 ucol_setStrength(coll, search.strength); in TestDiacriticMatch()
1779 …log_err("Error opening string search collator(\"%s\") %s\n", search.collator, u_errorName(status)); in TestDiacriticMatch()
1789 u_unescape(search.text, text, 128); in TestDiacriticMatch()
1790 u_unescape(search.pattern, pattern, 128); in TestDiacriticMatch()
1793 if (!assertEqualWithUStringSearch(strsrch, search)) { in TestDiacriticMatch()
1798 search = DIACRITICMATCH[++count]; in TestDiacriticMatch()
1877 const SearchData *search = &(BREAKITERATORCANONICAL[count]); in TestBreakIteratorCanonical() local
1878 UCollator *collator = getCollator(search->collator); in TestBreakIteratorCanonical()
1879 UBreakIterator *breaker = getBreakIterator(search->breaker); in TestBreakIteratorCanonical()
1882 u_unescape(search->text, text, 128); in TestBreakIteratorCanonical()
1883 u_unescape(search->pattern, pattern, 32); in TestBreakIteratorCanonical()
1884 ucol_setStrength(collator, search->strength); in TestBreakIteratorCanonical()
1903 if (!assertEqualWithUStringSearch(strsrch, *search)) { in TestBreakIteratorCanonical()
1908 search = &(BREAKITERATOREXACT[count + 1]); in TestBreakIteratorCanonical()
1909 breaker = getBreakIterator(search->breaker); in TestBreakIteratorCanonical()
1919 if (!assertEqualWithUStringSearch(strsrch, *search)) { in TestBreakIteratorCanonical()
1995 const SearchData *search = &(OVERLAPCANONICAL[count]); in TestOverlapCanonical() local
1996 UCollator *collator = getCollator(search->collator); in TestOverlapCanonical()
2000 u_unescape(search->text, text, 128); in TestOverlapCanonical()
2001 u_unescape(search->pattern, pattern, 32); in TestOverlapCanonical()
2018 if (!assertEqualWithUStringSearch(strsrch, *search)) { in TestOverlapCanonical()
2022 search = &(NONOVERLAPCANONICAL[count]); in TestOverlapCanonical()
2029 if (!assertEqualWithUStringSearch(strsrch, *search)) { in TestOverlapCanonical()
2312 SearchData search = BASICCANONICAL[searchDataIndex ++]; in TestGetSetOffsetCanonical() local
2313 int32_t matchindex = search.offset[count]; in TestGetSetOffsetCanonical()
2321 u_unescape(search.text, text, 128); in TestGetSetOffsetCanonical()
2322 u_unescape(search.pattern, pattern, 32); in TestGetSetOffsetCanonical()
2327 int32_t matchlength = search.size[count]; in TestGetSetOffsetCanonical()
2341 matchindex = search.offset[count + 1] == -1 ? -1 : in TestGetSetOffsetCanonical()
2342 search.offset[count + 2]; in TestGetSetOffsetCanonical()
2343 if (search.offset[count + 1] != -1) { in TestGetSetOffsetCanonical()
2344 usearch_setOffset(strsrch, search.offset[count + 1] + 1, in TestGetSetOffsetCanonical()
2346 if (usearch_getOffset(strsrch) != search.offset[count + 1] + 1) { in TestGetSetOffsetCanonical()
2472 UStringSearch *search = NULL; in TestForwardBackward() local
2489 search = usearch_openFromCollator(value, 2, usrcstr, 22, coll, NULL, &status); in TestForwardBackward()
2495 usearch_reset(search); in TestForwardBackward()
2497 pos = usearch_first(search, &status); in TestForwardBackward()
2504 usearch_reset(search); in TestForwardBackward()
2506 pos = usearch_last(search, &status); in TestForwardBackward()
2515 if (search != NULL) { in TestForwardBackward()
2516 usearch_close(search); in TestForwardBackward()
2529 UStringSearch *search; in TestSearchForNull() local
2582 search = usearch_openFromCollator(pattern, PATTERN_LEN, text, in TestSearchForNull()
2586 if (coll != NULL && search != NULL) { in TestSearchForNull()
2587 pos = usearch_first(search, &ec); in TestSearchForNull()
2588 len = usearch_getMatchedLength(search); in TestSearchForNull()
2599 for (pos = usearch_first(search, &ec); pos != USEARCH_DONE; pos in TestSearchForNull()
2600 = usearch_next(search, &ec)) { in TestSearchForNull()
2611 usearch_close(search); in TestSearchForNull()
2618 UStringSearch *search; in TestStrengthIdentical() local
2639 search = usearch_openFromCollator (pattern, pLen, text, tLen, coll, NULL, &ec); in TestStrengthIdentical()
2642 if (coll != NULL && search != NULL) { in TestStrengthIdentical()
2643 pos = usearch_first(search, &ec); in TestStrengthIdentical()
2644 len = usearch_getMatchedLength(search); in TestStrengthIdentical()
2656 usearch_reset(search); in TestStrengthIdentical()
2658 pos = usearch_first(search, &ec); in TestStrengthIdentical()
2659 len = usearch_getMatchedLength(search); in TestStrengthIdentical()
2666 usearch_close(search); in TestStrengthIdentical()
2832 static void TestPCEBuffer_with(const UChar *search, uint32_t searchLen, const UChar *source, uint32… in TestPCEBuffer_with() argument
2873 usearch = usearch_openFromCollator( search, in TestPCEBuffer_with()
2947 UChar search[] = in TestPCEBuffer_100df() local
2951 uint32_t searchLen = UPRV_LENGTHOF(search); in TestPCEBuffer_100df()
2953 TestPCEBuffer_with(search,searchLen,source,sourceLen); in TestPCEBuffer_100df()
2958 UChar search[] = in TestPCEBuffer_2surr() local
2962 uint32_t searchLen = UPRV_LENGTHOF(search); in TestPCEBuffer_2surr()
2964 TestPCEBuffer_with(search,searchLen,source,sourceLen); in TestPCEBuffer_2surr()
2969 UChar search[] = { 0x00c9 }; in TestMatchFollowedByIgnorables() local
2982 searchLen = UPRV_LENGTHOF(search); in TestMatchFollowedByIgnorables()
3009 usearch = usearch_openFromCollator(search, in TestMatchFollowedByIgnorables()