mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-21 12:40:02 +00:00
ICU-3178 Don't use assert. It's very inconvienient while testing on other platforms.
X-SVN-Rev: 13453
This commit is contained in:
parent
4db959c3a0
commit
6422d50c07
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue