summaryrefslogtreecommitdiffstats
path: root/src/imports/testlib/TestCase.qml
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2010-12-16 09:26:02 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2010-12-16 09:26:02 +1000
commit8bbdf2bb1f81f5a655e44d1eec14f4170e00a1df (patch)
tree5ce1dcaf7bb96a934dcba852ce30c534879d0ade /src/imports/testlib/TestCase.qml
parent81e09bb0d7bb5b8ce58773f5e9422b3c507006dd (diff)
Fix expectFail() example and clarify documentation
Diffstat (limited to 'src/imports/testlib/TestCase.qml')
-rw-r--r--src/imports/testlib/TestCase.qml16
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")
}