summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptcontext
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-08-28 10:04:01 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-08-28 10:05:11 (GMT)
commit089f2bed9ba92f688709d89e65273309a07cfef9 (patch)
treec65648c731fe61ff8ee11f2f5253420fb2dc540f /tests/auto/qscriptcontext
parent2d5a70e25c1ea140cb2c6faca4758af4f1d2a663 (diff)
downloadQt-089f2bed9ba92f688709d89e65273309a07cfef9.zip
Qt-089f2bed9ba92f688709d89e65273309a07cfef9.tar.gz
Qt-089f2bed9ba92f688709d89e65273309a07cfef9.tar.bz2
QScriptContextInfo: fix the line numbers with JIT
It even works better than with the interpreter
Diffstat (limited to 'tests/auto/qscriptcontext')
-rw-r--r--tests/auto/qscriptcontext/tst_qscriptcontext.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
index ef609e0..a85c0bd 100644
--- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
+++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
@@ -598,8 +598,11 @@ void tst_QScriptContext::backtrace_data()
expected << "<native>('hey') at -1"
<< "<eval>() at 3"
- //### line number should be 2 but the line number information is not kept for eval call
+#ifdef ENABLE_JIT
+ << "foo(arg1 = 'hello', arg2 = 456) at testfile:2"
+#else //### interpreter unfortunately does store information about line number for eval()
<< "foo(arg1 = 'hello', arg2 = 456) at testfile:-1"
+#endif
<< "<global>() at testfile:4";
QTest::newRow("eval") << source << expected;
@@ -658,8 +661,11 @@ void tst_QScriptContext::backtrace_data()
expected << "<native>('hey') at -1"
<< "<eval>() at 3"
- //### line number should be 3 but the line number information is not kept for eval call
+#ifdef ENABLE_JIT
+ << "plop('hello', 456) at testfile:3"
+#else //### interpreter unfortunately does store information about line number for eval()
<< "plop('hello', 456) at testfile:-1"
+#endif
<< "<global>() at testfile:5";
QTest::newRow("eval in member") << source << expected;