Fix error in qdeclarativeecmascript autotest.
authorJason McDonald <jason.mcdonald@nokia.com>
Thu, 9 Feb 2012 00:20:36 +0000 (10:20 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 9 Feb 2012 02:46:28 +0000 (03:46 +0100)
The test did not correctly ignore warning messages, but instead ignored
too many messages for one data row and too few for another data row.
This error was exposed when testlib was changed in qtbase commit
d9e35e2884cc75969f0eb860082ea11f8bb95a64 to be more strict with checking
that all ignored messages are correctly produced.

Task-number: QTBUG-24156
Change-Id: Iae73fb26bda83317256c504a8cb3d45783444f66
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp

index 1c382de..219eac6 100644 (file)
@@ -3202,8 +3202,7 @@ void tst_qdeclarativeecmascript::importScripts_data()
     QTest::newRow("import with imports has it's own activation scope")
             << testFileUrl("jsimportfail/failFive.qml")
             << QString()
-            << (QStringList() << QString(QLatin1String("file://") + testFileUrl("jsimportfail/importWithImports.js").toLocalFile() + QLatin1String(":8: ReferenceError: Can't find variable: Component"))
-                              << QString(QLatin1String("file://") + testFileUrl("jsimportfail/importPragmaLibrary.js").toLocalFile() + QLatin1String(":6: ReferenceError: Can't find variable: Component")))
+            << (QStringList() << QString(QLatin1String("file://") + testFileUrl("jsimportfail/importWithImports.js").toLocalFile() + QLatin1String(":8: ReferenceError: Can't find variable: Component")))
             << (QStringList() << QLatin1String("componentError"))
             << (QVariantList() << QVariant(0));
 
@@ -3217,7 +3216,7 @@ void tst_qdeclarativeecmascript::importScripts_data()
     QTest::newRow("pragma library imports shouldn't inherit parent imports or scope")
             << testFileUrl("jsimportfail/testImportPragmaLibrary.qml")
             << QString()
-            << QStringList()
+            << (QStringList() << QString(QLatin1String("file://") + testFileUrl("jsimportfail/importPragmaLibrary.js").toLocalFile() + QLatin1String(":6: ReferenceError: Can't find variable: Component")))
             << (QStringList() << QLatin1String("testValue"))
             << (QVariantList() << QVariant(0));
 
@@ -3238,8 +3237,6 @@ void tst_qdeclarativeecmascript::importScripts_data()
 
 void tst_qdeclarativeecmascript::importScripts()
 {
-    QSKIP("These warnings come out as INFO, not Warning - https://bugreports.qt-project.org/browse/QTBUG-24156");
-
     QFETCH(QUrl, testfile);
     QFETCH(QString, errorMessage);
     QFETCH(QStringList, warningMessages);