summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2011-02-28 14:03:23 (GMT)
committerKent Hansen <kent.hansen@nokia.com>2011-02-28 14:03:23 (GMT)
commit94a654a67296b37a882a829d3c65d4abd12b4a1c (patch)
treebb1b49e175d33f4d14d8d78bf29ac9578787efbf /tests
parenteedc18d1fdcf7c359916304cbf0b4629bbf70c84 (diff)
downloadQt-94a654a67296b37a882a829d3c65d4abd12b4a1c.zip
Qt-94a654a67296b37a882a829d3c65d4abd12b4a1c.tar.gz
Qt-94a654a67296b37a882a829d3c65d4abd12b4a1c.tar.bz2
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
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qscriptcontext/tst_qscriptcontext.cpp14
1 files 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 << "<native>('hey') at -1"
<< "<eval>() 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"
<< "<global>() at testfile:4";
QTest::newRow("eval") << source << expected;
@@ -787,10 +784,7 @@ void tst_QScriptContext::backtrace_data()
expected << "<native>('hey') at -1"
<< "<eval>() 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"
<< "<global>() 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<QStringList>(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);
}