summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestcase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib/qtestcase.cpp')
-rw-r--r--src/testlib/qtestcase.cpp41
1 files changed, 31 insertions, 10 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index b1bceb771c..8bd836d7f9 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -160,40 +160,61 @@ QT_BEGIN_NAMESPACE
\sa QVERIFY(), QTRY_COMPARE(), QTest::toString()
*/
-/*! \macro QTRY_VERIFY(condition)
+/*! \macro QTRY_VERIFY_WITH_TIMEOUT(condition, timeout)
\relates QTest
- The QTRY_VERIFY() macro is similar to QVERIFY(), but checks the \a condition
- repeatedly, until either the condition becomes true or a maximum timeout is
+ The QTRY_VERIFY_WITH_TIMEOUT() macro is similar to QVERIFY(), but checks the \a condition
+ repeatedly, until either the condition becomes true or the \a timeout is
reached. Between each evaluation, events will be processed. If the timeout
is reached, a failure is recorded in the test log and the test won't be
executed further.
- The timeout is fixed at five seconds.
+ \note This macro can only be used in a test function that is invoked
+ by the test framework.
+
+ \sa QTRY_VERIFY(), QVERIFY(), QCOMPARE(), QTRY_COMPARE()
+*/
+
+
+/*! \macro QTRY_VERIFY(condition)
+
+ \relates QTest
+
+ Invokes QTRY_VERIFY_WITH_TIMEOUT() with a timeout of five seconds.
\note This macro can only be used in a test function that is invoked
by the test framework.
- \sa QVERIFY(), QCOMPARE(), QTRY_COMPARE()
+ \sa QTRY_VERIFY_WITH_TIMEOUT(), QVERIFY(), QCOMPARE(), QTRY_COMPARE()
*/
-/*! \macro QTRY_COMPARE(actual, expected)
+/*! \macro QTRY_COMPARE_WITH_TIMEOUT(actual, expected, timeout)
\relates QTest
- The QTRY_COMPARE() macro is similar to QCOMPARE(), but performs the comparison
+ The QTRY_COMPARE_WITH_TIMEOUT() macro is similar to QCOMPARE(), but performs the comparison
of the \a actual and \a expected values repeatedly, until either the two values
- are equal or a maximum timeout is reached. Between each comparison, events
+ are equal or the \a timeout is reached. Between each comparison, events
will be processed. If the timeout is reached, a failure is recorded in the
test log and the test won't be executed further.
- The timeout is fixed at five seconds.
+ \note This macro can only be used in a test function that is invoked
+ by the test framework.
+
+ \sa QTRY_COMPARE(), QCOMPARE(), QVERIFY(), QTRY_VERIFY()
+*/
+
+/*! \macro QTRY_COMPARE(actual, expected)
+
+ \relates QTest
+
+ Invokes QTRY_COMPARE_WITH_TIMEOUT() with a timeout of five seconds.
\note This macro can only be used in a test function that is invoked
by the test framework.
- \sa QCOMPARE(), QVERIFY(), QTRY_VERIFY()
+ \sa QTRY_COMPARE_WITH_TIMEOUT(), QCOMPARE(), QVERIFY(), QTRY_VERIFY()
*/
/*! \macro QFETCH(type, name)