diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-08-14 13:20:25 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-15 09:03:16 +0200 |
commit | 8854338fe988a38514e69fe52a831a1ac3c6f936 (patch) | |
tree | e9abf13df7c48502968a9f291fdbac0c2b5294af /tests | |
parent | b0c4e816e6da2c09593cf8de2f563093947ebdaf (diff) | |
download | qtscript-8854338fe988a38514e69fe52a831a1ac3c6f936.tar.gz |
Remove dead code from backtrace autotest
With the JSC-based back-end, Error objects don't have a "stack"
property, and there is no Error.backtrace() function. Commit
a670b4756885b106db04651cd2a7030e02f0cc2f removed all mention of them
from the documentation, but not from the autotest; this code wasn't
reached anymore because of a preceding QEXPECT_FAIL in the autotest
function.
Change-Id: Ib34cbd5edff126137cec02bf68624e4a102ace84
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qscriptengine/tst_qscriptengine.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index 5cb1f08..dc81cdb 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -3078,41 +3078,6 @@ void tst_QScriptEngine::stacktrace() QCOMPARE(result.property("fileName").toString(), fileName); QCOMPARE(result.property("lineNumber").toInt32(), 9); - QScriptValue stack = result.property("stack"); - QVERIFY(stack.isArray()); - - QCOMPARE(stack.property("length").toInt32(), 7); - - QScriptValueIterator it(stack); - int counter = 5; - while (it.hasNext()) { - it.next(); - QScriptValue obj = it.value(); - QScriptValue frame = obj.property("frame"); - - QCOMPARE(obj.property("fileName").toString(), fileName); - if (counter >= 0) { - QScriptValue callee = frame.property("arguments").property("callee"); - QVERIFY(callee.strictlyEquals(eng.globalObject().property("foo"))); - QCOMPARE(obj.property("functionName").toString(), QString("foo")); - int line = obj.property("lineNumber").toInt32(); - if (counter == 5) - QCOMPARE(line, 9); - else - QCOMPARE(line, 3 + counter); - } else { - QVERIFY(frame.strictlyEquals(eng.globalObject())); - QVERIFY(obj.property("functionName").toString().isEmpty()); - } - - --counter; - } - - { - QScriptValue bt = result.property("backtrace").call(result); - QCOMPARE(qscriptvalue_cast<QStringList>(bt), backtrace); - } - // throw something that isn't an Error object eng.clearExceptions(); QVERIFY(eng.uncaughtExceptionBacktrace().isEmpty()); |