diff --git a/tests/packagestructuretest.cpp b/tests/packagestructuretest.cpp index 71c646c98..fe70aac04 100644 --- a/tests/packagestructuretest.cpp +++ b/tests/packagestructuretest.cpp @@ -18,6 +18,9 @@ *******************************************************************************/ #include "packagestructuretest.h" + +#include + #include "plasma/packages.cpp" void PackageStructureTest::init() @@ -35,17 +38,17 @@ void PackageStructureTest::type() QCOMPARE(ps->type(), QString("Plasmoid")); } -#include void PackageStructureTest::directories() { QList dirs; - dirs << "images" << "config" << "configui" << "scripts"; - qSort(dirs); + dirs << "config" << "configui" << "images" << "scripts"; QList psDirs = ps->directories(); - qSort(psDirs); - QCOMPARE(psDirs, dirs); + QCOMPARE(dirs.count(), psDirs.count()); + for (int i = 0; i < dirs.count(); ++i) { + QCOMPARE(dirs[i], psDirs[i]); + } } void PackageStructureTest::requiredDirectories() @@ -58,19 +61,26 @@ void PackageStructureTest::files() { QList files; files << "mainconfiggui" << "mainconfigxml" << "mainscript"; - qSort(files); QList psFiles = ps->files(); - qSort(psFiles); - QCOMPARE(psFiles, files); + QCOMPARE(files.count(), psFiles.count()); + for (int i = 0; i < files.count(); ++i) { + QCOMPARE(files[i], psFiles[i]); + } } void PackageStructureTest::requiredFiles() { QList files; files << "mainscript"; - QCOMPARE(ps->requiredFiles(), files); + + QList psFiles = ps->requiredFiles(); + + QCOMPARE(files.count(), psFiles.count()); + for (int i = 0; i < files.count(); ++i) { + QCOMPARE(files[i], psFiles[i]); + } } void PackageStructureTest::path()