diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-10 11:38:07 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-10 11:38:07 (GMT) |
commit | 5897326b86d30a347a004d54bd1fd86097caf9aa (patch) | |
tree | 36a69444902f3ed4b276e1c2b47316ed865c19bb /tests/auto/qscriptcontextinfo | |
parent | ed7acc2ba2d11afd4fb0a8afae3d3e1567283571 (diff) | |
download | Qt-5897326b86d30a347a004d54bd1fd86097caf9aa.zip Qt-5897326b86d30a347a004d54bd1fd86097caf9aa.tar.gz Qt-5897326b86d30a347a004d54bd1fd86097caf9aa.tar.bz2 |
implement QScriptContextInfo streaming from datastream
Diffstat (limited to 'tests/auto/qscriptcontextinfo')
-rw-r--r-- | tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp b/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp index 1adef98..0877717 100644 --- a/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp +++ b/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp @@ -203,7 +203,7 @@ void tst_QScriptContextInfo::scriptFunction() // evaluate() QScriptContextInfo info = lst.at(2); QCOMPARE(info.functionType(), QScriptContextInfo::NativeFunction); - QEXPECT_FAIL("", "doesn't works", Abort); + QEXPECT_FAIL("", "Script ID is invalid for evaluate() call", Abort); QVERIFY(info.scriptId() != -1); QCOMPARE(info.fileName(), fileName); QCOMPARE(info.lineNumber(), lineNumber + 3); @@ -516,8 +516,6 @@ void tst_QScriptContextInfo::nullContext() void tst_QScriptContextInfo::streaming() { - QEXPECT_FAIL("", "Crashes", Abort); - QVERIFY(false); { QScriptContextInfo info((QScriptContext*)0); QByteArray ba; @@ -547,6 +545,7 @@ void tst_QScriptContextInfo::streaming() QScriptValue ret = eng.evaluate("function bar(a, b, c) {\n return getContextInfoList();\n}\nbar()", fileName, lineNumber); QList<QScriptContextInfo> lst = qscriptvalue_cast<QList<QScriptContextInfo> >(ret); + QEXPECT_FAIL("", "getContextInfoList() returns one item too many", Continue); QCOMPARE(lst.size(), 3); for (int i = 0; i < lst.size(); ++i) { const QScriptContextInfo &info = lst.at(i); |