diff options
-rw-r--r-- | tests/auto/installer/scriptengine/data/broken_connect.qs | 2 | ||||
-rw-r--r-- | tests/auto/installer/scriptengine/tst_scriptengine.cpp | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/installer/scriptengine/data/broken_connect.qs b/tests/auto/installer/scriptengine/data/broken_connect.qs index 2fe873b63..9c7c2b864 100644 --- a/tests/auto/installer/scriptengine/data/broken_connect.qs +++ b/tests/auto/installer/scriptengine/data/broken_connect.qs @@ -6,6 +6,6 @@ function BrokenConnect() function receive() { print("function receive()"); - // this should throw an exception, "foo" does not exist + // this will print an error. foo.bar = "test"; } diff --git a/tests/auto/installer/scriptengine/tst_scriptengine.cpp b/tests/auto/installer/scriptengine/tst_scriptengine.cpp index 09785850e..0da511581 100644 --- a/tests/auto/installer/scriptengine/tst_scriptengine.cpp +++ b/tests/auto/installer/scriptengine/tst_scriptengine.cpp @@ -232,6 +232,9 @@ private slots: void testBrokenJSMethodConnect() { +#if QT_VERSION <= 0x50400 + QSKIP("Behavior changed from 5.4.1 onwards"); +#endif EmitSignalObject emiter; m_scriptEngine->globalObject().setProperty(QLatin1String("emiter"), m_scriptEngine->newQObject(&emiter)); @@ -248,11 +251,11 @@ private slots: // ignore Output from script setExpectedScriptOutput("\"function receive()\""); + QTest::ignoreMessage(QtWarningMsg, ":10: ReferenceError: foo is not defined"); emiter.produceSignal(); const QJSValue value = m_scriptEngine->evaluate(""); - QCOMPARE(value.isError(), true); - QCOMPARE(value.toString(), QLatin1String("ReferenceError: foo is not defined")); + QCOMPARE(value.isError(), false); } void testScriptPrint() |