fix the test
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=741740
This commit is contained in:
parent
a490dc44ee
commit
09f337b3fa
@ -18,6 +18,9 @@
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
#include "packagestructuretest.h"
|
#include "packagestructuretest.h"
|
||||||
|
|
||||||
|
#include <KDebug>
|
||||||
|
|
||||||
#include "plasma/packages.cpp"
|
#include "plasma/packages.cpp"
|
||||||
|
|
||||||
void PackageStructureTest::init()
|
void PackageStructureTest::init()
|
||||||
@ -35,17 +38,17 @@ void PackageStructureTest::type()
|
|||||||
QCOMPARE(ps->type(), QString("Plasmoid"));
|
QCOMPARE(ps->type(), QString("Plasmoid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <KDebug>
|
|
||||||
void PackageStructureTest::directories()
|
void PackageStructureTest::directories()
|
||||||
{
|
{
|
||||||
QList<const char*> dirs;
|
QList<const char*> dirs;
|
||||||
dirs << "images" << "config" << "configui" << "scripts";
|
dirs << "config" << "configui" << "images" << "scripts";
|
||||||
qSort(dirs);
|
|
||||||
|
|
||||||
QList<const char*> psDirs = ps->directories();
|
QList<const char*> 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()
|
void PackageStructureTest::requiredDirectories()
|
||||||
@ -58,19 +61,26 @@ void PackageStructureTest::files()
|
|||||||
{
|
{
|
||||||
QList<const char*> files;
|
QList<const char*> files;
|
||||||
files << "mainconfiggui" << "mainconfigxml" << "mainscript";
|
files << "mainconfiggui" << "mainconfigxml" << "mainscript";
|
||||||
qSort(files);
|
|
||||||
|
|
||||||
QList<const char*> psFiles = ps->files();
|
QList<const char*> 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()
|
void PackageStructureTest::requiredFiles()
|
||||||
{
|
{
|
||||||
QList<const char*> files;
|
QList<const char*> files;
|
||||||
files << "mainscript";
|
files << "mainscript";
|
||||||
QCOMPARE(ps->requiredFiles(), files);
|
|
||||||
|
QList<const char*> psFiles = ps->requiredFiles();
|
||||||
|
|
||||||
|
QCOMPARE(files.count(), psFiles.count());
|
||||||
|
for (int i = 0; i < files.count(); ++i) {
|
||||||
|
QCOMPARE(files[i], psFiles[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PackageStructureTest::path()
|
void PackageStructureTest::path()
|
||||||
|
Loading…
Reference in New Issue
Block a user