tst_qqmlecmascript: add expected warning

Change-Id: I6b5cebb75ceeed6664a5d239ee8ce66b171f2667
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
David Faure 2019-05-31 14:20:07 +02:00
parent 6c76ee30ce
commit 677d336def
1 changed files with 3 additions and 1 deletions

View File

@ -8270,7 +8270,9 @@ void tst_qqmlecmascript::varPropertyAccessOnObjectWithInvalidContext()
void tst_qqmlecmascript::importedScriptsAccessOnObjectWithInvalidContext()
{
QQmlEngine engine;
QQmlComponent component(&engine, testFileUrl("importedScriptsAccessOnObjectWithInvalidContext.qml"));
const QUrl url = testFileUrl("importedScriptsAccessOnObjectWithInvalidContext.qml");
QTest::ignoreMessage(QtWarningMsg, qPrintable(url.toString() + ":29: TypeError: Cannot read property 'Foo' of null"));
QQmlComponent component(&engine, url);
QScopedPointer<QObject> obj(component.create());
if (obj.isNull())
qDebug() << component.errors().first().toString();