From 759f5e99b887a53db0cb1b1d718a838ce3ae2f99 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 23 Feb 2011 11:06:09 +0100 Subject: Make autotest insensitive to exact JS error wording This type of change was already done for the other QtScript autotests. We don't guarantee a particular wording of messages, since they can change between versions of the same back-end or differ between back-ends. The only thing we care about in this context is that a syntax error was in fact thrown. --- tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp index d3b1573..065f099 100644 --- a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp +++ b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp @@ -2247,8 +2247,7 @@ void tst_QScriptEngineAgent::syntaxError() QCOMPARE(spy->at(i).scriptId, spy->at(0).scriptId); QVERIFY(!spy->at(i).hasExceptionHandler); QVERIFY(spy->at(i).value.isError()); - QEXPECT_FAIL("","QTBUG-6137 There are other messages in JSC",Continue); - QCOMPARE(spy->at(i).value.toString(), QString("SyntaxError: Expected `}'")); + QVERIFY(spy->at(i).value.toString().contains(QLatin1String("SyntaxError"))); QCOMPARE(spy->at(i).scriptId, spy->at(0).scriptId); i = 7; //exit script -- cgit v0.12