ICU-4148 gcc has a bug where RuleBasedBreakIterator::DONE isn't exported correctly.
Change this test so that it doesn't go into an infinite loop. X-SVN-Rev: 16740
This commit is contained in:
parent
7fe85edd5b
commit
9f8bdd2935
@ -883,8 +883,16 @@ void RBBITest::doMultipleSelectionTest(RuleBasedBreakIterator& iterator, BITestD
|
||||
count++;
|
||||
offset = iterator.next();
|
||||
|
||||
if (offset != RuleBasedBreakIterator::DONE && *testIterator == iterator)
|
||||
errln("operator== failed: Two unequal iterators compared equal.");
|
||||
if (offset != RuleBasedBreakIterator::DONE && *testIterator == iterator) {
|
||||
errln("operator== failed: Two unequal iterators compared equal. count=%d offset=%d", count, offset);
|
||||
if (count > 10000 || offset == -1) {
|
||||
errln("operator== failed too many times. Stopping test.");
|
||||
if (offset == -1) {
|
||||
errln("Does (RuleBasedBreakIterator::DONE == -1)?");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (offset != RuleBasedBreakIterator::DONE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user