aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlimport
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2021-02-25 10:19:01 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2021-02-25 12:02:42 +0100
commitae22e8d47977a5ea51c1ffaa0a0eaeefd6aec70a (patch)
tree82bb1ed8145a8c1a669eddd8c5acf4c37c09117e /tests/auto/qml/qqmlimport
parent9aa3db2e19b2e1622b878cf34b1978f4fdbcac39 (diff)
tst_qqmliport: Use absolute path for comparison
On Windows, we would be missing the drive letter otherwise. Also put actual and expected into the correct order. Fixes: QTBUG-88643 Pick-to: 6.0 6.1 Change-Id: I427779d164a37e06524de4cfa8bb1fa9feb4d4e4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlimport')
-rw-r--r--tests/auto/qml/qqmlimport/BLACKLIST3
-rw-r--r--tests/auto/qml/qqmlimport/tst_qqmlimport.cpp9
2 files changed, 5 insertions, 7 deletions
diff --git a/tests/auto/qml/qqmlimport/BLACKLIST b/tests/auto/qml/qqmlimport/BLACKLIST
deleted file mode 100644
index dfd4d646da..0000000000
--- a/tests/auto/qml/qqmlimport/BLACKLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-[importPathOrder]
-msvc-2019
-windows-10 gcc developer-build
diff --git a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
index 94da02f80f..df3d2ba625 100644
--- a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
+++ b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
@@ -181,17 +181,18 @@ void tst_QQmlImport::importPathOrder()
<< QLatin1String("qrc:/qt-project.org/imports")
<< qml2Imports;
QQmlEngine engine;
- QCOMPARE(expectedImportPaths, engine.importPathList());
+ QCOMPARE(engine.importPathList(), expectedImportPaths);
// Add an import path
engine.addImportPath(QT_QMLTEST_DATADIR);
- expectedImportPaths.prepend(QT_QMLTEST_DATADIR);
- QCOMPARE(expectedImportPaths, engine.importPathList());
+ QFileInfo fi(QT_QMLTEST_DATADIR);
+ expectedImportPaths.prepend(fi.absoluteFilePath());
+ QCOMPARE(engine.importPathList(), expectedImportPaths);
// Add qml2Imports again to make it the first of the list
engine.addImportPath(qml2Imports);
expectedImportPaths.move(expectedImportPaths.indexOf(qml2Imports), 0);
- QCOMPARE(expectedImportPaths, engine.importPathList());
+ QCOMPARE(engine.importPathList(), expectedImportPaths);
}
Q_DECLARE_METATYPE(QQmlImports::ImportVersion)