From 8854338fe988a38514e69fe52a831a1ac3c6f936 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Tue, 14 Aug 2012 13:20:25 +0200 Subject: 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 --- tests/auto/qscriptengine/tst_qscriptengine.cpp | 35 -------------------------- 1 file changed, 35 deletions(-) (limited to 'tests') 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(bt), backtrace); - } - // throw something that isn't an Error object eng.clearExceptions(); QVERIFY(eng.uncaughtExceptionBacktrace().isEmpty()); -- cgit v1.2.1