Lines Matching refs:matches
349 // REGEX_TESTLM("pattern", "input text", lookingAt expected, matches expected);
399 actualmatch = REMatcher->matches(status);
401 errln("RegexTest failure in matches() at line %d. Status = %s\n",
406 errln("RegexTest: wrong return from matches() at line %d.\n", line);
475 actualmatch = REMatcher->matches(status);
477 errln("RegexTest failure in matches() at line %d (UTF8). Status = %s\n",
482 errln("RegexTest: wrong return from matches() at line %d (UTF8).\n", line);
645 REGEX_TESTLM("[\\p{Nd}]*", "a123456", TRUE, FALSE); // note that * matches 0 occurences.
702 REGEX_TESTLM(".*\\Ax", "xyz", TRUE, FALSE); // \A matches only at the beginning of input
703 REGEX_TESTLM(".*\\Ax", " xyz", FALSE, FALSE); // \A matches only at the beginning of input
827 REGEX_ASSERT(m1->matches(4, status) == TRUE);
829 REGEX_ASSERT(m1->matches(3, status) == FALSE);
831 REGEX_ASSERT(m1->matches(5, status) == FALSE);
832 REGEX_ASSERT(m1->matches(4, status) == TRUE);
833 REGEX_ASSERT(m1->matches(-1, status) == FALSE);
840 REGEX_ASSERT(m1->matches(len, status) == FALSE);
845 REGEX_ASSERT(m1->matches(len+1, status) == FALSE);
855 REGEX_ASSERT(m.matches(len, status) == TRUE);
858 REGEX_ASSERT(m.matches(0, status) == TRUE);
1034 // find with zero length matches, match position should bump ahead
1040 RegexMatcher m("(?= ?)", 0, status); // This pattern will zero-length matches anywhere,
1069 // with pattern of /.?/, should see a series of one char matches, then a single
1127 REGEX_ASSERT(m.matches(status));
1283 REGEX_ASSERT(matcher.matches(status) == TRUE);
1326 // Plain vanilla matches.
1338 // Plain vanilla non-matches.
1446 UnicodeString s = "The matches start with ss and end with ee ss stuff ee fin";
1457 REGEX_ASSERT(result == "The matches start with ss and end with ee ooh");
1467 REGEX_ASSERT(result == "The matches start with ss and end with ee ooh");
1477 REGEX_ASSERT(result == "The matches start with ss and end with ee ooh");
1480 REGEX_ASSERT(result == "The matches start with ss and end with ee ooh fin");
1577 // matches convenience API
1579 REGEX_ASSERT(RegexPattern::matches(".*", "random input", pe, status) == TRUE);
1581 REGEX_ASSERT(RegexPattern::matches("abc", "random input", pe, status) == FALSE);
1583 REGEX_ASSERT(RegexPattern::matches(".*nput", "random input", pe, status) == TRUE);
1585 REGEX_ASSERT(RegexPattern::matches("random input", "random input", pe, status) == TRUE);
1587 REGEX_ASSERT(RegexPattern::matches(".*u", "random input", pe, status) == FALSE);
1590 REGEX_ASSERT(RegexPattern::matches("abc", "abc", pe, status) == FALSE);
1901 REGEX_ASSERT(m1->matches(4, status) == TRUE);
1903 REGEX_ASSERT(m1->matches(3, status) == FALSE);
1905 REGEX_ASSERT(m1->matches(5, status) == FALSE);
1906 REGEX_ASSERT(m1->matches(4, status) == TRUE);
1907 REGEX_ASSERT(m1->matches(-1, status) == FALSE);
1913 REGEX_ASSERT(m1->matches(input2Len, status) == FALSE);
1918 REGEX_ASSERT(m1->matches(input2Len+1, status) == FALSE);
1927 matches(input1Len, status) == TRUE);
1930 REGEX_ASSERT(m.matches(0, status) == TRUE);
2186 // find with zero length matches, match position should bump ahead
2192 RegexMatcher m("(?= ?)", 0, status); // This pattern will zero-length matches anywhere,
2225 // with pattern of /.?/, should see a series of one char matches, then a single
2292 REGEX_ASSERT(m.matches(status));
2404 // Plain vanilla matches.
2439 // Plain vanilla non-matches.
2679 const char str_blah[] = { 0x54, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x65, 0x65, 0x20, 0x73, 0x73, 0x20, 0x73, 0x74, 0x75, 0x66, 0x66, 0x20, 0x65, 0x65, 0x20, 0x66, 0x69, 0x6e, 0x00 }; /* The matches start with ss and end with ee ss stuff ee fin */
2698 const char str_blah2[] = { 0x54, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x65, 0x65, 0x20, 0x6f, 0x6f, 0x68, 0x00 }; /* The matches start with ss and end with ee ooh */
2710 const char str_blah3[] = { 0x54, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x65, 0x65, 0x20, 0x6f, 0x6f, 0x68, 0x00 }; /* The matches start with ss and end with ee ooh */
2722 const char str_blah8[] = { 0x54, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x65, 0x65, 0x20, 0x6f, 0x6f, 0x68, 0x00 }; /* The matches start with ss and end with ee ooh */
2726 const char str_blah9[] = { 0x54, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x65, 0x65, 0x20, 0x6f, 0x6f, 0x68, 0x20, 0x66, 0x69, 0x6e, 0x00 }; /* The matches start with ss and end with ee ooh fin */
2848 // matches convenience API
2860 REGEX_ASSERT(RegexPattern::matches(&pattern, &input, pe, status) == TRUE);
2865 REGEX_ASSERT(RegexPattern::matches("abc", "random input", pe, status) == FALSE);
2870 REGEX_ASSERT(RegexPattern::matches(".*nput", "random input", pe, status) == TRUE);
2874 REGEX_ASSERT(RegexPattern::matches("random input", "random input", pe, status) == TRUE);
2879 REGEX_ASSERT(RegexPattern::matches(".*u", "random input", pe, status) == FALSE);
2885 REGEX_ASSERT(RegexPattern::matches("abc", "abc", pe, status) == FALSE);
3418 // 'M' flag. Use matches() instead of find()
3554 // error on both matches() and lookingAt().
3558 isMatch = matcher->matches(status);
3560 isUTF8Match = UTF8Matcher->matches(status);
4020 flagMat->matches(status);
4389 flagMat->matches(status);
4689 REGEX_ASSERT_FAIL(result=matcher.matches(status), U_REGEX_STACK_OVERFLOW);
4760 REGEX_ASSERT(matcher.matches(status));
4770 REGEX_ASSERT(matcher.matches(status)==FALSE);
4779 REGEX_ASSERT(matcher.matches(status)==FALSE);
5161 pMatcher->matches(status);