Пример #1
0
 private void _testIsBoundary(RuleBasedBreakIterator rbbi, String text, int[] boundaries) {
   logln("testIsBoundary():");
   int p = 1;
   boolean isB;
   for (int i = 0; i <= text.length(); i++) {
     isB = rbbi.isBoundary(i);
     logln("rbbi.isBoundary(" + i + ") -> " + isB);
     if (i == boundaries[p]) {
       if (!isB) errln("Wrong result from isBoundary() for " + i + ": expected true, got false");
       ++p;
     } else {
       if (isB) errln("Wrong result from isBoundary() for " + i + ": expected false, got true");
     }
   }
 }