diff options
author | Albert Astals Cid <albert.astals@canonical.com> | 2017-04-04 16:26:20 +0200 |
---|---|---|
committer | Albert Astals Cid <albert.astals@canonical.com> | 2017-04-05 07:07:19 +0000 |
commit | af72231fe4a91226d945db9a526fb755332548eb (patch) | |
tree | 4739e114b5aa6c2557444cb91c84fbf738a949be /tests | |
parent | fdb822613989c5975ba282b775e6d194467bdef4 (diff) |
Error out if TestCase.verify receives more than 2 parameters
Change-Id: I3299f602970067aaef290d4f1c7449d3ab03fb3c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qmltest/selftests/tst_selftests.qml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qmltest/selftests/tst_selftests.qml b/tests/auto/qmltest/selftests/tst_selftests.qml index 439ea7a70d..5555876014 100644 --- a/tests/auto/qmltest/selftests/tst_selftests.qml +++ b/tests/auto/qmltest/selftests/tst_selftests.qml @@ -167,6 +167,16 @@ TestCase { caught = true } verify(caught) + + caught = false; + try { + testCase.verify(true, "foo", "bar") + } catch (e) { + compare(e.message, "QtQuickTest::fail") + compare(functions.failmsg, "More than two arguments given to verify(). Did you mean tryVerify() or tryCompare()?") + caught = true + } + verify(caught) } function test_compare() { |