summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptengine
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-08-04 15:35:45 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-08-04 15:35:45 (GMT)
commit175b1689c9e173db62eb5612c7076531354e5252 (patch)
treedaef8b1350e4adfa6f770460acc303d59037db74 /tests/auto/qscriptengine
parent7025e0d29b653b575ad28556c9b78f7a8e040b49 (diff)
downloadQt-175b1689c9e173db62eb5612c7076531354e5252.zip
Qt-175b1689c9e173db62eb5612c7076531354e5252.tar.gz
Qt-175b1689c9e173db62eb5612c7076531354e5252.tar.bz2
clear abort flag when we start a new evaluate
Otherwise evaluate() would _always_ return the value previously passed to abortEvaluation(), once a script had been aborted.
Diffstat (limited to 'tests/auto/qscriptengine')
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp
index f7bac56..06be924 100644
--- a/tests/auto/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp
@@ -2536,6 +2536,13 @@ void tst_QScriptEngine::abortEvaluation()
eng.abortEvaluation();
QVERIFY(!eng.hasUncaughtException());
+ eng.abortEvaluation(123);
+ {
+ QScriptValue ret = eng.evaluate("'ciao'");
+ QVERIFY(ret.isString());
+ QCOMPARE(ret.toString(), QString::fromLatin1("ciao"));
+ }
+
EventReceiver3 receiver(&eng);
eng.setProcessEventsInterval(100);