mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-12537 RBBI monkey test, improve error checking in test setup.
X-SVN-Rev: 38736
This commit is contained in:
parent
37c12c5961
commit
c1633486ae
1 changed files with 9 additions and 4 deletions
|
@ -904,22 +904,27 @@ void RBBIMonkeyTest::testMonkey() {
|
|||
for (i=0; tests[i] != NULL; ++i) {
|
||||
logln("beginning testing of %s", tests[i]);
|
||||
RBBIMonkeyImpl *test = new RBBIMonkeyImpl(status);
|
||||
if (U_FAILURE(status)) {
|
||||
errln("%s:%d: error %s while starting test %s.", __FILE__, __LINE__, u_errorName(status), tests[i]);
|
||||
break;
|
||||
}
|
||||
test->fDumpExpansions = dumpExpansions;
|
||||
test->fVerbose = verbose;
|
||||
test->fRandomGenerator.seed((uint32_t)seed);
|
||||
test->fLoopCount = loopCount;
|
||||
test->setup(tests[i], status);
|
||||
if (U_FAILURE(status)) {
|
||||
errln("%s:%d: error %s while starting test %s.", __FILE__, __LINE__, u_errorName(status), tests[i]);
|
||||
break;
|
||||
}
|
||||
test->startTest();
|
||||
startedTests.addElement(test, status);
|
||||
if (U_FAILURE(status)) {
|
||||
errln("%s:%d: error %s while starting test %s.", __FILE__, __LINE__, u_errorName(status), tests[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (U_FAILURE(status)) {
|
||||
dataerrln("%s:%d: error %s while starting test %s.", __FILE__, __LINE__, u_errorName(status), tests[i]);
|
||||
}
|
||||
|
||||
for (i=0; i<startedTests.size(); ++i) {
|
||||
RBBIMonkeyImpl *test = static_cast<RBBIMonkeyImpl *>(startedTests.elementAt(i));
|
||||
test->join();
|
||||
|
|
Loading…
Add table
Reference in a new issue