Searched defs:RunMonkey (Results 1 - 1 of 1) sorted by relevance

/external/icu4c/test/intltest/
H A Drbbitst.cpp4323 RunMonkey(bi, m, "char", seed, loopCount, useUText);
4326 RunMonkey(bi, m, "char", seed, loopCount, TRUE);
4340 RunMonkey(bi, m, "word", seed, loopCount, useUText);
4356 RunMonkey(bi, m, "line", seed, loopCount, useUText);
4372 RunMonkey(bi, m, "sentence", seed, loopCount, useUText);
4392 void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, const char *name, uint32_t seed, function in class:RBBITest
4196 TEST_ASSERT(expectedcount < EXPECTEDSIZE); return; } expected[expectedcount ++] = i; } testBreakBoundPreceding(this, ustr, bi, expected, expectedcount); } delete bi; } void RBBITest::TestSentBreaks(void) { Locale locale(Ó); UErrorCode status = U_ZERO_ERROR; BreakIterator *bi = BreakIterator::createSentenceInstance(locale, status); UChar str[200]; static const char *strlist[] = { Ó, Ó, Ó, Ó, Ó, Ó, Ó, Ó, Ó, Ó, Ó Ó Ó Ó, Ó Ó Ó Ó Ó Ó }; int loop; if (U_FAILURE(status)) { errcheckln(status, Ó, u_errorName(status)); return; } for (loop = 0; loop < (int)(sizeof(strlist) / sizeof(char *)); loop ++) { u_unescape(strlist[loop], str, (int32_t)(sizeof(str) / sizeof(str[0]))); UnicodeString ustr(str); RBBISentMonkey monkey; if (U_FAILURE(monkey.deferredStatus)) { continue; } const int EXPECTEDSIZE = 50; int expected[EXPECTEDSIZE]; int expectedcount = 0; monkey.setText(ustr); int i; for (i = 0; i != BreakIterator::DONE; i = monkey.next(i)) { if (expectedcount >= EXPECTEDSIZE) { TEST_ASSERT(expectedcount < EXPECTEDSIZE); return; } expected[expectedcount ++] = i; } testBreakBoundPreceding(this, ustr, bi, expected, expectedcount); } delete bi; } void RBBITest::TestMonkey(char *params) { UErrorCode status = U_ZERO_ERROR; int32_t loopCount = 500; int32_t seed = 1; UnicodeString breakType = Ó; Locale locale(Ó); UBool useUText = FALSE; if (quick == FALSE) { loopCount = 10000; } if (params) { UnicodeString p(params); loopCount = getIntParam(Ó, p, loopCount); seed = getIntParam(Ó, p, seed); RegexMatcher m(Ó, p, 0, status); if (m.find()) { breakType = m.group(1, status); m.reset(); p = m.replaceFirst(Ó, status); } RegexMatcher u(Ó, p, 0, status); if (u.find()) { useUText = TRUE; u.reset(); p = u.replaceFirst(Ó, status); } if (RegexMatcher(UNICODE_STRING_SIMPLE(Ó), p, 0, status).find()) { char buf[100]; p.extract(buf, sizeof(buf), NULL, status); buf[sizeof(buf)-1] = 0; errln(Ó, buf); return; } } if (breakType == Ó || breakType == Ó) { RBBICharMonkey m; BreakIterator *bi = BreakIterator::createCharacterInstance(locale, status); if (U_SUCCESS(status)) { RunMonkey(bi, m, Ó, seed, loopCount, useUText); if (breakType == Ó && useUText==FALSE) { RunMonkey(bi, m, Ó, seed, loopCount, TRUE); } } else { errcheckln(status, Ó, u_errorName(status)); } delete bi; } if (breakType == Ó || breakType == Ó) { logln(Ó); RBBIWordMonkey m; BreakIterator *bi = BreakIterator::createWordInstance(locale, status); if (U_SUCCESS(status)) { RunMonkey(bi, m, Ó, seed, loopCount, useUText); } else { errcheckln(status, Ó, u_errorName(status)); } delete bi; } if (breakType == Ó || breakType == Ó) { logln(Ó); RBBILineMonkey m; BreakIterator *bi = BreakIterator::createLineInstance(locale, status); if (loopCount >= 10) { loopCount = loopCount / 5; } if (U_SUCCESS(status)) { RunMonkey(bi, m, Ó, seed, loopCount, useUText); } else { errcheckln(status, Ó, u_errorName(status)); } delete bi; } if (breakType == Ó || breakType == Ó ) { logln(Ó); RBBISentMonkey m; BreakIterator *bi = BreakIterator::createSentenceInstance(locale, status); if (loopCount >= 10) argument

Completed in 187 milliseconds