summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptengine/tst_qscriptengine.cpp
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2009-07-27 19:07:08 +0200
committerBenjamin Poulain <benjamin.poulain@nokia.com>2009-07-27 19:07:08 +0200
commit0a4579306706f1fbe91d8b54734491376cb92093 (patch)
tree9fe5bcfb91c204dfa23d0e871d72346f9ab440c5 /tests/auto/qscriptengine/tst_qscriptengine.cpp
parenta8dae30f3825d0527a38499e13bd8e36485aac47 (diff)
The line number is correctly reported for exception
Enable the tests checking the line number of exception. Add a lower bound on the lineNumber of QScriptEngin::evaluate()
Diffstat (limited to 'tests/auto/qscriptengine/tst_qscriptengine.cpp')
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp
index 997eb25fb8..fed5a4c717 100644
--- a/tests/auto/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp
@@ -1302,7 +1302,6 @@ void tst_QScriptEngine::uncaughtException()
{
QScriptValue ret = eng.evaluate("a = 10;\nb = 20;\n0 = 0;\n", /*fileName=*/QString(), /*lineNumber=*/x);
QVERIFY(eng.hasUncaughtException());
- QEXPECT_FAIL("", "Exception line number is wrong", Continue);
QCOMPARE(eng.uncaughtExceptionLineNumber(), x+2);
QVERIFY(eng.uncaughtException().strictlyEquals(ret));
(void)ret.toString();
@@ -1310,7 +1309,6 @@ void tst_QScriptEngine::uncaughtException()
QVERIFY(eng.uncaughtException().strictlyEquals(ret));
QVERIFY(fun.call().isNull());
QVERIFY(eng.hasUncaughtException());
- QEXPECT_FAIL("", "Exception line number is wrong", Continue);
QCOMPARE(eng.uncaughtExceptionLineNumber(), x+2);
QVERIFY(eng.uncaughtException().strictlyEquals(ret));
eng.clearExceptions();
@@ -1324,7 +1322,6 @@ void tst_QScriptEngine::uncaughtException()
QScriptValue ret2 = throwFun.call();
QVERIFY(ret2.isError());
QVERIFY(eng.hasUncaughtException());
- QEXPECT_FAIL("", "", Continue);
QVERIFY(eng.uncaughtException().strictlyEquals(ret2));
QEXPECT_FAIL("", "Exception line number is wrong", Continue);
QCOMPARE(eng.uncaughtExceptionLineNumber(), -1);
@@ -1348,7 +1345,6 @@ void tst_QScriptEngine::uncaughtException()
eng.globalObject().setProperty("throwFun", throwFun);
eng.evaluate("1;\nthrowFun();");
QVERIFY(eng.hasUncaughtException());
- QEXPECT_FAIL("", "", Continue);
QCOMPARE(eng.uncaughtExceptionLineNumber(), 2);
eng.clearExceptions();
QVERIFY(!eng.hasUncaughtException());
@@ -1765,7 +1761,6 @@ void tst_QScriptEngine::importExtension()
{
QScriptEngine eng;
QScriptValue ret = eng.importExtension("this.extension.does.not.exist");
- QEXPECT_FAIL("", "", Continue);
QCOMPARE(eng.hasUncaughtException(), true);
QCOMPARE(ret.isError(), true);
QCOMPARE(ret.toString(), QString::fromLatin1("Error: Unable to import this.extension.does.not.exist: no such extension"));
@@ -2048,7 +2043,6 @@ void tst_QScriptEngine::collectGarbage()
QScriptValue v = eng.newQObject(ptr, QScriptEngine::ScriptOwnership);
}
eng.collectGarbage();
- QEXPECT_FAIL("", "", Continue);
QVERIFY(ptr == 0);
}