diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-12-16 09:26:02 +1000 |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-12-16 09:26:02 +1000 |
commit | 8bbdf2bb1f81f5a655e44d1eec14f4170e00a1df (patch) | |
tree | 5ce1dcaf7bb96a934dcba852ce30c534879d0ade /src/imports/testlib/TestCase.qml | |
parent | 81e09bb0d7bb5b8ce58773f5e9422b3c507006dd (diff) |
Fix expectFail() example and clarify documentation
Diffstat (limited to 'src/imports/testlib/TestCase.qml')
-rw-r--r-- | src/imports/testlib/TestCase.qml | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index 0212c83..ea9df59 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -174,19 +174,27 @@ Item { } function expectFail(tag, msg) { - if (tag === undefined) + if (tag === undefined) { + warn("tag argument missing from expectFail()") tag = "" - if (msg === undefined) + } + if (msg === undefined) { + warn("message argument missing from expectFail()") msg = "" + } if (!qtest_results.expectFail(tag, msg, Qt.qtest_caller_file(), Qt.qtest_caller_line())) throw new Error("QtQuickTest::expectFail") } function expectFailContinue(tag, msg) { - if (tag === undefined) + if (tag === undefined) { + warn("tag argument missing from expectFailContinue()") tag = "" - if (msg === undefined) + } + if (msg === undefined) { + warn("message argument missing from expectFailContinue()") msg = "" + } if (!qtest_results.expectFailContinue(tag, msg, Qt.qtest_caller_file(), Qt.qtest_caller_line())) throw new Error("QtQuickTest::expectFail") } |