mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-15 01:42:37 +00:00
ICU-11123 promote RegexMatcher::find(UErrorCode &) to public API
X-SVN-Rev: 37073
This commit is contained in:
parent
56459a99d9
commit
d96fea9eb6
2 changed files with 10 additions and 1 deletions
|
@ -849,7 +849,7 @@ public:
|
|||
* position may not be valid with the altered input string.</p>
|
||||
* @param status A reference to a UErrorCode to receive any errors.
|
||||
* @return TRUE if a match is found.
|
||||
* @internal
|
||||
* @draft ICU 55
|
||||
*/
|
||||
virtual UBool find(UErrorCode &status);
|
||||
|
||||
|
|
|
@ -4879,6 +4879,15 @@ void RegexTest::Callbacks() {
|
|||
REGEX_ASSERT(matcher.matches(status)==FALSE);
|
||||
REGEX_ASSERT(status == U_REGEX_STOPPED_BY_CALLER);
|
||||
REGEX_ASSERT(cbInfo.numCalls == 4);
|
||||
|
||||
// A longer running find that the callback function will abort.
|
||||
status = U_ZERO_ERROR;
|
||||
cbInfo.reset(4);
|
||||
s = "aaaaaaaaaaaaaaaaaaaaaaab";
|
||||
matcher.reset(s);
|
||||
REGEX_ASSERT(matcher.find(status)==FALSE);
|
||||
REGEX_ASSERT(status == U_REGEX_STOPPED_BY_CALLER);
|
||||
REGEX_ASSERT(cbInfo.numCalls == 4);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue