diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-11 07:35:50 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-11 07:44:24 (GMT) |
commit | 81d8292e486bce768d9af27e3510520a769c4fa8 (patch) | |
tree | f2925d15dc89a6bb64b34ecf162d6ac9fa5e312d /tests/auto/qscriptcontextinfo | |
parent | 62281ca6f9e74a5c8b66204d74ceec0215ecab92 (diff) | |
download | Qt-81d8292e486bce768d9af27e3510520a769c4fa8.zip Qt-81d8292e486bce768d9af27e3510520a769c4fa8.tar.gz Qt-81d8292e486bce768d9af27e3510520a769c4fa8.tar.bz2 |
Fix line number and arguments in QScriptContext::toString
For arguments, we always need to skip the implicit 'this' argument
For line number, we walk thought the stack frames from the top to find
the one above the requested one, which contains the returnPC we need.
Also fixed a crash because QScriptContext::parentContext would have
returned a pointer with flags inside.
Reviewed-by: Kent Hansen
Diffstat (limited to 'tests/auto/qscriptcontextinfo')
-rw-r--r-- | tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp b/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp index 0877717..921cbd8 100644 --- a/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp +++ b/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp @@ -185,7 +185,6 @@ void tst_QScriptContextInfo::scriptFunction() QCOMPARE(info.functionType(), QScriptContextInfo::ScriptFunction); QVERIFY(info.scriptId() != -1); QCOMPARE(info.fileName(), fileName); - QEXPECT_FAIL("", "lineNumber doesn't work", Continue); QCOMPARE(info.lineNumber(), lineNumber + 1); QEXPECT_FAIL("", "columnNumber doesn't work", Continue); QCOMPARE(info.columnNumber(), 2); |