From 94a654a67296b37a882a829d3c65d4abd12b4a1c Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 28 Feb 2011 15:03:23 +0100 Subject: Make missing line number info an expected failure The fact that the line number is incorrect was hidden away in a comment in the test data. This commit makes it an explicit failure so that we're reminded of the issue. Reviewed-by: Olivier Goffart --- tests/auto/qscriptcontext/tst_qscriptcontext.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp index 9d7e896..f4833bf 100644 --- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp +++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp @@ -725,10 +725,7 @@ void tst_QScriptContext::backtrace_data() expected << "('hey') at -1" << "() at 3" - << QString::fromLatin1("foo(arg1 = 'hello', arg2 = 456) at testfile:%0") - // interpreter unfortunately doesn't provide line number for eval() - .arg(qt_script_isJITEnabled() ? 2 : -1); - expected + << "foo(arg1 = 'hello', arg2 = 456) at testfile:2" << "() at testfile:4"; QTest::newRow("eval") << source << expected; @@ -787,10 +784,7 @@ void tst_QScriptContext::backtrace_data() expected << "('hey') at -1" << "() at 3" - << QString::fromLatin1("plop('hello', 456) at testfile:%0") - // interpreter unfortunately doesn't provide line number for eval() - .arg(qt_script_isJITEnabled() ? 3 : -1); - expected + << "plop('hello', 456) at testfile:3" << "() at testfile:5"; QTest::newRow("eval in member") << source << expected; @@ -987,6 +981,10 @@ void tst_QScriptContext::backtrace() QVERIFY(!eng.hasUncaughtException()); QVERIFY(ret.isArray()); QStringList slist = qscriptvalue_cast(ret); + if (!qt_script_isJITEnabled()) { + QEXPECT_FAIL("eval", "QTBUG-17842: Missing line number in backtrace when function calls eval()", Continue); + QEXPECT_FAIL("eval in member", "QTBUG-17842: Missing line number in backtrace when function calls eval()", Continue); + } QCOMPARE(slist, expectedbacktrace); } -- cgit v0.12