diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-28 08:23:49 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-28 09:04:11 (GMT) |
commit | 102493fd341a322a369d21414fdb10aedaf23ff5 (patch) | |
tree | 2127a17bb8f43d6c4fbd70844d1dd683f7bd76b2 /tests | |
parent | 40bf78cc21d7f4821b0a841d646cd6fff8130513 (diff) | |
download | Qt-102493fd341a322a369d21414fdb10aedaf23ff5.zip Qt-102493fd341a322a369d21414fdb10aedaf23ff5.tar.gz Qt-102493fd341a322a369d21414fdb10aedaf23ff5.tar.bz2 |
Test tst_QScriptContext::lineNumber
The test was wrong. The line number should be from within the eval.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qscriptcontext/tst_qscriptcontext.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp index 4699562..524fff2 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); } |