ICU-3178 Don't use assert. It's very inconvienient while testing on other platforms.

X-SVN-Rev: 13453
This commit is contained in:
George Rhoten 2003-10-17 16:45:43 +00:00
parent 4db959c3a0
commit 6422d50c07

View file

@ -3063,7 +3063,9 @@ void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, char *name, uint
UnicodeSet *classSet = (UnicodeSet *)chClasses->elementAt(aClassNum);
int32_t charIdx = m_rand() % classSet->size();
UChar32 c = classSet->charAt(charIdx);
assert(c >= 0); // TODO: deal with sets containing strings.
if (c < 0) { // TODO: deal with sets containing strings.
errln("c < 0");
}
testText.append(c);
}
@ -3077,7 +3079,9 @@ void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, char *name, uint
if (breakPos == -1) {
break;
}
assert(breakPos <= testText.length());
if (breakPos > testText.length()) {
errln("breakPos > testText.length()");
}
expectedBreaks[breakPos] = 1;
}