Cosmetic: Silence the with statement warnings, in addition to the XFAIL
authorSimon Hausmann <simon.hausmann@digia.com>
Thu, 13 Jun 2013 08:17:07 +0000 (10:17 +0200)
committerLars Knoll <lars.knoll@digia.com>
Thu, 13 Jun 2013 12:12:49 +0000 (14:12 +0200)
Change-Id: I8a89acc93f1446a5ef6cb8441a8ad9b48c4fb752
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp

index ca7c95c..325deba 100644 (file)
@@ -6699,7 +6699,13 @@ void tst_qqmlecmascript::switchStatement()
 void tst_qqmlecmascript::withStatement()
 {
     {
-        QQmlComponent component(&engine, testFileUrl("withStatement.1.qml"));
+        QUrl url = testFileUrl("withStatement.1.qml");
+        QString warning = url.toString() + ":12:1: 'with' statement is not allowed in strict mode";
+        QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData());
+        warning = url.toString() + ":12:12: Unable to assign [undefined] to int";
+        QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData());
+
+        QQmlComponent component(&engine, url);
         MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create());
         QVERIFY(object != 0);