Lines Matching refs:bi
337 BreakIterator *bi = new RuleBasedBreakIterator(rulesString1, parseError, status); in TestStatusReturn() local
343 bi->setText(testString1); in TestStatusReturn()
344 for (pos=bi->first(); pos!= BreakIterator::DONE; pos=bi->next()) { in TestStatusReturn()
350 int tag = bi->getRuleStatus(); in TestStatusReturn()
358 delete bi; in TestStatusReturn()
421 BreakIterator* bi = BreakIterator::createWordInstance(Locale("th"), status); in TestBug3818() local
422 if (U_FAILURE(status) || bi == NULL) { in TestBug3818()
426 bi->setText(thaiStr); in TestBug3818()
428 int32_t startOfSecondWord = bi->following(1); in TestBug3818()
433 startOfSecondWord = bi->following(0); in TestBug3818()
438 delete bi; in TestBug3818()
447 void RBBITest::generalIteratorTest(RuleBasedBreakIterator& bi, BITestData &td) in generalIteratorTest() argument
450 bi.setText(td.fDataToBreak); in generalIteratorTest()
452 testFirstAndNext(bi, td); in generalIteratorTest()
454 testLastAndPrevious(bi, td); in generalIteratorTest()
456 testFollowing(bi, td); in generalIteratorTest()
457 testPreceding(bi, td); in generalIteratorTest()
458 testIsBoundary(bi, td); in generalIteratorTest()
459 doMultipleSelectionTest(bi, td); in generalIteratorTest()
467 void RBBITest::testFirstAndNext(RuleBasedBreakIterator& bi, BITestData &td) in testFirstAndNext() argument
475 bi.setText(td.fDataToBreak); in testFirstAndNext()
478 for (p=bi.first(); p!=RuleBasedBreakIterator::DONE; p=bi.next()) { in testFirstAndNext()
480 tag = bi.getRuleStatus(); in testFirstAndNext()
496 void RBBITest::testLastAndPrevious(RuleBasedBreakIterator& bi, BITestData &td) in testLastAndPrevious() argument
504 bi.setText(td.fDataToBreak); in testLastAndPrevious()
507 for (p=bi.last(); p!=RuleBasedBreakIterator::DONE; p=bi.previous()) { in testLastAndPrevious()
513 tag = bi.getRuleStatus(); in testLastAndPrevious()
526 void RBBITest::testFollowing(RuleBasedBreakIterator& bi, BITestData &td) in testFollowing() argument
536 bi.setText(td.fDataToBreak); in testFollowing()
540 p = bi.first(); in testFollowing()
542 tag = bi.getRuleStatus(); in testFollowing()
546 p = bi.following(i); in testFollowing()
553 tag = bi.getRuleStatus(); in testFollowing()
571 void RBBITest::testPreceding(RuleBasedBreakIterator& bi, BITestData &td) { in testPreceding() argument
579 bi.setText(td.fDataToBreak); in testPreceding()
582 p = bi.last(); in testPreceding()
584 tag = bi.getRuleStatus(); in testPreceding()
588 p = bi.preceding(i); in testPreceding()
596 tag = bi.getRuleStatus(); in testPreceding()
613 void RBBITest::testIsBoundary(RuleBasedBreakIterator& bi, BITestData &td) { in testIsBoundary() argument
619 bi.setText(td.fDataToBreak); in testIsBoundary()
623 if (bi.isBoundary(i)) { in testIsBoundary()
625 tag = bi.getRuleStatus(); in testIsBoundary()
703 …RuleBasedBreakIterator* bi = (RuleBasedBreakIterator *)BreakIterator::createLineInstance(Locale::g… in TestEmptyString() local
709 generalIteratorTest(*bi, x); in TestEmptyString()
710 delete bi; in TestEmptyString()
810 BreakIterator *bi = BreakIterator::createSentenceInstance(Locale::getEnglish(), status); in TestBug5775() local
816 TEST_ASSERT(bi != NULL); in TestBug5775()
817 if (bi == NULL) { in TestBug5775()
824 bi->setText(s); in TestBug5775()
825 int pos = bi->next(); in TestBug5775()
827 pos = bi->next(); in TestBug5775()
829 pos = bi->previous(); in TestBug5775()
831 delete bi; in TestBug5775()
843 BreakIterator *bi; // Break iterator is set while parsing test source. member
856 bi = NULL; in TestParams()
865 delete bi; in ~TestParams()
1005 if (t->bi == NULL) { in executeTest()
1009 t->bi->setText(t->textToBreak, status); in executeTest()
1014 for (bp = t->bi->first(); bp != BreakIterator::DONE; bp = t->bi->next()) { in executeTest()
1047 int32_t rs = ((RuleBasedBreakIterator *)t->bi)->getRuleStatus(); in executeTest()
1070 for (bp = t->bi->last(); bp != BreakIterator::DONE; bp = t->bi->previous()) { in executeTest()
1099 int32_t rs = t->bi->getRuleStatus(); in executeTest()
1121 UBool boundaryFound = t->bi->isBoundary(i); in executeTest()
1132 int32_t actualBreak = t->bi->following(i); in executeTest()
1149 int32_t actualBreak = t->bi->preceding(i); in executeTest()
1273 delete tp.bi; in TestExtended()
1274 tp.bi = BreakIterator::createWordInstance(locale, status); in TestExtended()
1280 delete tp.bi; in TestExtended()
1281 tp.bi = BreakIterator::createCharacterInstance(locale, status); in TestExtended()
1287 delete tp.bi; in TestExtended()
1288 tp.bi = BreakIterator::createLineInstance(locale, status); in TestExtended()
1294 delete tp.bi; in TestExtended()
1295 tp.bi = BreakIterator::createSentenceInstance(locale, status); in TestExtended()
1301 delete tp.bi; in TestExtended()
1302 tp.bi = BreakIterator::createTitleInstance(locale, status); in TestExtended()
1558 RuleBasedBreakIterator bi(rules, parseError, status); in TestDictRules() local
1561 bi.setText(utext); in TestDictRules()
1565 position = bi.next(); in TestDictRules()
1704 RuleBasedBreakIterator *bi; in TestUnicodeFiles() local
1707 …bi = (RuleBasedBreakIterator *)BreakIterator::createCharacterInstance(Locale::getEnglish(), statu… in TestUnicodeFiles()
1710 runUnicodeTestData("GraphemeBreakTest.txt", bi); in TestUnicodeFiles()
1712 delete bi; in TestUnicodeFiles()
1714 bi = (RuleBasedBreakIterator *)BreakIterator::createWordInstance(Locale::getEnglish(), status); in TestUnicodeFiles()
1717 runUnicodeTestData("WordBreakTest.txt", bi); in TestUnicodeFiles()
1719 delete bi; in TestUnicodeFiles()
1721 …bi = (RuleBasedBreakIterator *)BreakIterator::createSentenceInstance(Locale::getEnglish(), status… in TestUnicodeFiles()
1724 runUnicodeTestData("SentenceBreakTest.txt", bi); in TestUnicodeFiles()
1726 delete bi; in TestUnicodeFiles()
1728 bi = (RuleBasedBreakIterator *)BreakIterator::createLineInstance(Locale::getEnglish(), status); in TestUnicodeFiles()
1731 runUnicodeTestData("LineBreakTest.txt", bi); in TestUnicodeFiles()
1733 delete bi; in TestUnicodeFiles()
1768 void RBBITest::runUnicodeTestData(const char *fileName, RuleBasedBreakIterator *bi) { in runUnicodeTestData() argument
1862 checkUnicodeTestCase(fileName, lineNumber, testString, &breakPositions, bi); in runUnicodeTestData()
1905 RuleBasedBreakIterator *bi) { in checkUnicodeTestCase() argument
1910 bi->setText(testString); in checkUnicodeTestCase()
1911 pos = bi->first(); in checkUnicodeTestCase()
1912 pos = bi->next(); in checkUnicodeTestCase()
1931 pos = bi->next(); in checkUnicodeTestCase()
3608 BreakIterator *bi, in testBreakBoundPreceding() argument
3615 bi->setText(ustr); in testBreakBoundPreceding()
3616 for (i = bi->first(); i != BreakIterator::DONE; i = bi->next()) { in testBreakBoundPreceding()
3634 if (!bi->isBoundary(j)) { in testBreakBoundPreceding()
3640 if (bi->isBoundary(j)) { in testBreakBoundPreceding()
3648 for (i = bi->last(); i != BreakIterator::DONE; i = bi->previous()) { in testBreakBoundPreceding()
3668 if (bi->preceding(j) != expected[i]) { in testBreakBoundPreceding()
3685 BreakIterator *bi = BreakIterator::createWordInstance(locale, status); in TestWordBreaks() local
3750 testBreakBoundPreceding(this, ustr, bi, expected, expectedcount); in TestWordBreaks()
3752 delete bi; in TestWordBreaks()
3762 BreakIterator *bi = BreakIterator::createWordInstance(locale, status); in TestWordBoundary() local
3808 bi->setText(ustr); in TestWordBoundary()
3811 for (i = bi->first(); i != BreakIterator::DONE; i = bi->next()) { in TestWordBoundary()
3816 if (bi->isBoundary(j)) { in TestWordBoundary()
3824 if (!bi->isBoundary(i)) { in TestWordBoundary()
3833 delete bi; in TestWordBoundary()
3841 BreakIterator *bi = BreakIterator::createLineInstance(locale, status); in TestLineBreaks() local
3928 testBreakBoundPreceding(this, ustr, bi, expected, expectedcount); in TestLineBreaks()
3930 delete bi; in TestLineBreaks()
3939 BreakIterator *bi = BreakIterator::createSentenceInstance(locale, status); in TestSentBreaks() local
3992 testBreakBoundPreceding(this, ustr, bi, expected, expectedcount); in TestSentBreaks()
3994 delete bi; in TestSentBreaks()
4047 BreakIterator *bi = BreakIterator::createCharacterInstance(locale, status); in TestMonkey() local
4049 RunMonkey(bi, m, "char", seed, loopCount, useUText); in TestMonkey()
4052 RunMonkey(bi, m, "char", seed, loopCount, TRUE); in TestMonkey()
4058 delete bi; in TestMonkey()
4064 BreakIterator *bi = BreakIterator::createWordInstance(locale, status); in TestMonkey() local
4066 RunMonkey(bi, m, "word", seed, loopCount, useUText); in TestMonkey()
4071 delete bi; in TestMonkey()
4077 BreakIterator *bi = BreakIterator::createLineInstance(locale, status); in TestMonkey() local
4082 RunMonkey(bi, m, "line", seed, loopCount, useUText); in TestMonkey()
4087 delete bi; in TestMonkey()
4093 BreakIterator *bi = BreakIterator::createSentenceInstance(locale, status); in TestMonkey() local
4098 RunMonkey(bi, m, "sentence", seed, loopCount, useUText); in TestMonkey()
4103 delete bi; in TestMonkey()
4118 void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, const char *name, uint32_t seed, in RunMonkey() argument
4211 bi->setText(testUText, status); in RunMonkey()
4217 bi->setText(testText); in RunMonkey()
4220 for (i=bi->first(); i != BreakIterator::DONE; i=bi->next()) { in RunMonkey()
4230 for (i=bi->last(); i != BreakIterator::DONE; i=bi->previous()) { in RunMonkey()
4242 isBoundaryBreaks[i] = bi->isBoundary(i); in RunMonkey()
4252 breakPos = bi->following(i); in RunMonkey()
4272 breakPos = bi->preceding(i); in RunMonkey()
4381 const char *badLocale = bi->getLocaleID(ULOC_ACTUAL_LOCALE, status); in RunMonkey()
4421 BreakIterator *bi = BreakIterator::createWordInstance(Locale("th"), status); in TestBug5532() local
4424 bi->setText(&utext, status); in TestBug5532()
4429 for (bi->first(); bi->next() != BreakIterator::DONE; breakCount++) { in TestBug5532()
4431 TEST_ASSERT(previousBreak < bi->current()); in TestBug5532()
4432 previousBreak = bi->current(); in TestBug5532()
4436 delete bi; in TestBug5532()
4501 RuleBasedBreakIterator* bi = in TestDebug()
4508 bi->setText(s); in TestDebug()
4509 UBool r = bi->isBoundary(8); in TestDebug()
4512 pos = bi->last(); in TestDebug()
4516 pos = bi->previous(); in TestDebug()