diff options
Diffstat (limited to 'tests/auto/testlib')
-rw-r--r-- | tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp b/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp index 9fc490417c..fc12738604 100644 --- a/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp +++ b/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp @@ -112,12 +112,16 @@ void tst_VerifyExceptionThrown::testCorrectMyExceptions() const void tst_VerifyExceptionThrown::testFailInt() const { - QVERIFY_EXCEPTION_THROWN(throw int(5), double); + try { + QVERIFY_EXCEPTION_THROWN(throw int(5), double); + } catch (int) {} } void tst_VerifyExceptionThrown::testFailStdString() const { - QVERIFY_EXCEPTION_THROWN(throw std::string("some string"), char*); + try { + QVERIFY_EXCEPTION_THROWN(throw std::string("some string"), char*); + } catch (const std::string &) {} } void tst_VerifyExceptionThrown::testFailStdRuntimeError() const |