diff options
author | Dmitry Ashkadov <dmitry.ashkadov@gmail.com> | 2013-10-11 14:05:01 +0400 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-26 07:37:06 +0100 |
commit | 4a9092eaad34ca4788247c1ecb216f7d3b3d1d08 (patch) | |
tree | c77bead318449a4fa257ff0cd860555df7550db3 /tests/auto/testlib/selftests/expected_verifyexceptionthrown.lightxml | |
parent | 5d8c05baf478d8eb8cb7ce827caa2c1103f5fa3f (diff) |
Add QVERIFY_EXCEPTION_THROWN macro for testing exceptions using QtTest
New macro QVERIFY_EXCEPTION_THROWN may be used to check that some code
really throws an exception of specified type.
Change-Id: I7cf499c7c37a35407862bc604c6eb862c5f329d3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Diffstat (limited to 'tests/auto/testlib/selftests/expected_verifyexceptionthrown.lightxml')
-rw-r--r-- | tests/auto/testlib/selftests/expected_verifyexceptionthrown.lightxml | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/auto/testlib/selftests/expected_verifyexceptionthrown.lightxml b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.lightxml new file mode 100644 index 0000000000..6ef857c6d0 --- /dev/null +++ b/tests/auto/testlib/selftests/expected_verifyexceptionthrown.lightxml @@ -0,0 +1,49 @@ +<Environment> + <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion> + <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion> +</Environment> +<TestFunction name="initTestCase"> +<Incident type="pass" file="" line="0" /> +</TestFunction> +<TestFunction name="testCorrectStdTypes"> +<Incident type="pass" file="" line="0" /> +</TestFunction> +<TestFunction name="testCorrectStdExceptions"> +<Incident type="pass" file="" line="0" /> +</TestFunction> +<TestFunction name="testCorrectMyExceptions"> +<Incident type="pass" file="" line="0" /> +</TestFunction> +<TestFunction name="testFailInt"> +<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp" line="128"> + <Description><![CDATA[Expected exception of type double to be thrown but unknown exception caught]]></Description> +</Incident> +</TestFunction> +<TestFunction name="testFailStdString"> +<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp" line="133"> + <Description><![CDATA[Expected exception of type char* to be thrown but unknown exception caught]]></Description> +</Incident> +</TestFunction> +<TestFunction name="testFailStdRuntimeError"> +<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp" line="138"> + <Description><![CDATA[Expected exception of type std::runtime_error to be thrown but std::exception caught with message: logic error]]></Description> +</Incident> +</TestFunction> +<TestFunction name="testFailMyException"> +<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp" line="143"> + <Description><![CDATA[Expected exception of type MyBaseException to be thrown but std::exception caught with message: logic error]]></Description> +</Incident> +</TestFunction> +<TestFunction name="testFailMyDerivedException"> +<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp" line="148"> + <Description><![CDATA[Expected exception of type std::runtime_error to be thrown but std::exception caught with message: MyDerivedException]]></Description> +</Incident> +</TestFunction> +<TestFunction name="testFailNoException"> +<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp" line="153"> + <Description><![CDATA[Expected exception of type std::exception to be thrown but no exception caught]]></Description> +</Incident> +</TestFunction> +<TestFunction name="cleanupTestCase"> +<Incident type="pass" file="" line="0" /> +</TestFunction> |