diff options
Diffstat (limited to 'src/imports/testlib/testcase.qdoc')
-rw-r--r-- | src/imports/testlib/testcase.qdoc | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/imports/testlib/testcase.qdoc b/src/imports/testlib/testcase.qdoc index 4e95c5e..bb7044f 100644 --- a/src/imports/testlib/testcase.qdoc +++ b/src/imports/testlib/testcase.qdoc @@ -78,7 +78,7 @@ FAIL! : MathTests::test_fail() 2 + 2 = 5 Actual (): 4 Expected (): 5 - Loc: [file:///.../tst_math.qml(12)] + Loc: [/home/.../tst_math.qml(12)] PASS : MathTests::test_math() PASS : MathTests::cleanupTestCase() Totals: 3 passed, 1 failed, 0 skipped @@ -378,24 +378,30 @@ */ /*! - \qmlmethod TestCase::expectFail(tag, message = "") + \qmlmethod TestCase::expectFail(tag, message) In a data-driven test, marks the row associated with \a tag as - expected to fail. When the fail occurs, display the optional - \a message, abort the test, and mark the test as passing. - Similar to \c{QEXPECT_FAIL(tag, message, Abort)} in C++. + expected to fail. When the fail occurs, display the \a message, + abort the test, and mark the test as passing. Similar to + \c{QEXPECT_FAIL(tag, message, Abort)} in C++. + + If the test is not data-driven, then \a tag must be set to + the empty string. \sa expectFailContinue() */ /*! - \qmlmethod TestCase::expectFailContinue(tag, message = "") + \qmlmethod TestCase::expectFailContinue(tag, message) In a data-driven test, marks the row associated with \a tag as - expected to fail. When the fail occurs, display the optional - \a message, and then continue the test. Similar to + expected to fail. When the fail occurs, display the \a message, + and then continue the test. Similar to \c{QEXPECT_FAIL(tag, message, Continue)} in C++. + If the test is not data-driven, then \a tag must be set to + the empty string. + \sa expectFail() */ @@ -411,9 +417,9 @@ /*! \qmlmethod TestCase::ignoreWarning(message) - Marks \a message as an ignored message. When it occurs, the message - will not be printed and the test passes. If the message does not - occur, then the test will fail. Similar to + Marks \a message as an ignored warning message. When it occurs, + the warning will not be printed and the test passes. If the message + does not occur, then the test will fail. Similar to \c{QTest::ignoreMessage(QtWarningMsg, message)} in C++. \sa warn() |