summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestcase.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib/qtestcase.qdoc')
-rw-r--r--src/testlib/qtestcase.qdoc35
1 files changed, 25 insertions, 10 deletions
diff --git a/src/testlib/qtestcase.qdoc b/src/testlib/qtestcase.qdoc
index 72f8cdaf8c..dd5ec762a7 100644
--- a/src/testlib/qtestcase.qdoc
+++ b/src/testlib/qtestcase.qdoc
@@ -149,15 +149,24 @@
\relates QTest
- The QVERIFY_EXCEPTION_THROWN macro executes an \a expression and tries
- to catch an exception thrown from the \a expression. If the \a expression
- throws an exception and its type is the same as \a exceptiontype
- or \a exceptiontype is substitutable with the type of thrown exception
- (i.e. usually the type of thrown exception is publicly derived
- from \a exceptiontype) then execution will be continued. If not-substitutable
- type of exception is thrown or the \a expression doesn't throw an exception
- at all, then a failure will be recorded in the test log and
- the test won't be executed further.
+ The QVERIFY_EXCEPTION_THROWN macro executes \a expression
+ and tries to catch an exception thrown from \a expression.
+
+ There are several possible outcomes:
+
+ \list
+ \li If \a expression throws an exception that is either the same as
+ \a exceptiontype or derived from \a exceptiontype, then execution will continue.
+
+ \li Otherwise, if \a expression throws no exception, or the
+ exception thrown derives from \c{std::exception}, then a failure
+ will be recorded in the test log and the macro returns early
+ (from enclosing function).
+
+ \li If the thrown exception derives neither from \c{std::exception} nor from
+ \a exceptiontype, a failure will be recorded in the test log, and the exception is
+ re-thrown. This avoids problems with e.g. pthread cancellation exceptions.
+ \endlist
\note This macro can only be used in a test function that is invoked
by the test framework.
@@ -1258,7 +1267,7 @@
should typically use createTouchDevice() to initialize a QTouchDevice
member variable in your test case class, and use the same instance for all tests.
- \sa QTest::QTouchEventSequence
+ \sa QTest::QTouchEventSequence, touchEvent()
*/
/*!
@@ -1394,6 +1403,9 @@
QTouchEventSequence is called (ie when the object returned runs out of scope), unless
\a autoCommit is set to false. When \a autoCommit is false, commit() has to be called
manually.
+
+ \l createTouchDevice() can be called to create a test touch device for use with this
+ function.
*/
/*!
@@ -1410,6 +1422,9 @@
QTouchEventSequence is called (ie when the object returned runs out of scope), unless
\a autoCommit is set to false. When \a autoCommit is false, commit() has to be called
manually.
+
+ \l createTouchDevice() can be called to create a test touch device for use with this
+ function.
*/
// Internals of qtestmouse.h: