diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-15 08:08:59 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-15 08:08:59 (GMT) |
commit | 58dbd9c74f398b030c44ec2bc6af99af2edd913a (patch) | |
tree | 1659379c0889fe89a981682625528eb922256b64 /tests/auto/qscriptengine | |
parent | 38615f6bb0c0788ef61b3dd48490751d8a489327 (diff) | |
download | Qt-58dbd9c74f398b030c44ec2bc6af99af2edd913a.zip Qt-58dbd9c74f398b030c44ec2bc6af99af2edd913a.tar.gz Qt-58dbd9c74f398b030c44ec2bc6af99af2edd913a.tar.bz2 |
clear script exceptions when executing Qt methods
The argument conversion logic checks for exceptions after
attempting to convert each argument; this requires that there
is initially no exception, otherwise it's going to bail out
even if the conversion itself succeeded.
Diffstat (limited to 'tests/auto/qscriptengine')
-rw-r--r-- | tests/auto/qscriptengine/tst_qscriptengine.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index 49e80b5..8e250d1 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -1776,6 +1776,7 @@ void tst_QScriptEngine::castWithPrototypeChain() { QScriptValue ret = toBaz.call(scriptZoo, QScriptValueList() << baz2Value); QVERIFY(ret.isError()); + QEXPECT_FAIL("", "Should give an error message ('Incompatible type of argument(s) ...')", Continue); QCOMPARE(ret.toString(), QLatin1String("TypeError: incompatible type of argument(s) in call to toBaz(); candidates were\n toBaz(Bar*)")); } |