summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-07-28 10:23:49 +0200
committerOlivier Goffart <ogoffart@trolltech.com>2009-07-28 11:04:11 +0200
commit102493fd341a322a369d21414fdb10aedaf23ff5 (patch)
tree2127a17bb8f43d6c4fbd70844d1dd683f7bd76b2 /tests/auto/qscriptcontext/tst_qscriptcontext.cpp
parent40bf78cc21d7f4821b0a841d646cd6fff8130513 (diff)
Test tst_QScriptContext::lineNumber
The test was wrong. The line number should be from within the eval.
Diffstat (limited to 'tests/auto/qscriptcontext/tst_qscriptcontext.cpp')
-rw-r--r--tests/auto/qscriptcontext/tst_qscriptcontext.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
index 4699562009..524fff2c2d 100644
--- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
+++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
@@ -530,12 +530,10 @@ void tst_QScriptContext::lineNumber()
QScriptValue result = eng.evaluate("try { eval(\"foo = 123;\\n this[is{a{syntax|error@#$%@#% \"); } catch (e) { e.lineNumber; }", "foo.qs", 123);
QVERIFY(!eng.hasUncaughtException());
QVERIFY(result.isNumber());
- QEXPECT_FAIL("", "error line number is wrong", Continue);
- QCOMPARE(result.toInt32(), 124);
+ QCOMPARE(result.toInt32(), 2);
result = eng.evaluate("foo = 123;\n bar = 42\n0 = 0");
QVERIFY(eng.hasUncaughtException());
- QEXPECT_FAIL("", "uncaught exception line number is wrong", Continue);
QCOMPARE(eng.uncaughtExceptionLineNumber(), 3);
QCOMPARE(result.property("lineNumber").toInt32(), 3);
}