diff options
author | Marco Alanen <denravonska@gmail.com> | 2011-04-01 08:52:19 (GMT) |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2011-04-01 09:04:11 (GMT) |
commit | 467fdd578e6787497f2b702dca0cf38afdc0e6de (patch) | |
tree | 73cb7fafdcfa06438c41a6387007209770b3a279 | |
parent | f285904ae2f376c39ee3538aa2362e9632534700 (diff) | |
download | Qt-467fdd578e6787497f2b702dca0cf38afdc0e6de.zip Qt-467fdd578e6787497f2b702dca0cf38afdc0e6de.tar.gz Qt-467fdd578e6787497f2b702dca0cf38afdc0e6de.tar.bz2 |
Fix bug when catching exceptions in tests.
Resets currentTestObject if an exception is caught while executing a
test suite. This is required or else subsequent test executions will
trigger an assert.
Task-number: QTBUG-3869
Merge-request: 1163
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
-rw-r--r-- | src/testlib/qtestcase.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 287d8e6..9a0d087 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -1865,6 +1865,8 @@ int QTest::qExec(QObject *testObject, int argc, char **argv) IOPMAssertionRelease(powerID); } #endif + currentTestObject = 0; + // Rethrow exception to make debugging easier. throw; return 1; |