Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.5.0
-
None
-
467fdd578e6787497f2b702dca0cf38afdc0e6de
Description
If an uncaught exception occurs during QTest::runTests(), QTestCase, a custom exception handler can not clean up after self. Continuing with additional test runs causes an assertion:
QFATAL : ::UnknownTestFunction ASSERT !currentTestObject in qtestcase.cpp line 1160
The custom handler needs to call a cleanup function, something like [derived from qtestcase.cpp]
QTestResult::finishedCurrentTestFunction();
QTestResult::setCurrentTestFunction(0);
QTestTable::clearGlobalTestTable();
QTestLog::stopLogging();
currentTestObject = 0;