tests for isValid and hasValidStructure
This commit is contained in:
parent
928d5e63a5
commit
b9405c5702
@ -49,6 +49,28 @@ void PackageStructureTest::initTestCase()
|
||||
ps.setPath(m_packagePath);
|
||||
}
|
||||
|
||||
void PackageStructureTest::validStructures()
|
||||
{
|
||||
QVERIFY(ps.hasValidStructure());
|
||||
QVERIFY(!Plasma::Package().hasValidStructure());
|
||||
QVERIFY(!Plasma::PluginLoader::self()->loadPackage("doesNotExist").hasValidStructure());
|
||||
}
|
||||
|
||||
void PackageStructureTest::validPackages()
|
||||
{
|
||||
QVERIFY(ps.isValid());
|
||||
QVERIFY(!Plasma::Package().isValid());
|
||||
QVERIFY(!Plasma::PluginLoader::self()->loadPackage("doesNotExist").isValid());
|
||||
QVERIFY(NoPrefixes().isValid());
|
||||
|
||||
Plasma::Package p = Plasma::PluginLoader::self()->loadPackage("Plasma/Generic");
|
||||
QVERIFY(!p.isValid());
|
||||
p.setPath("/does/not/exist");
|
||||
QVERIFY(!p.isValid());
|
||||
p.setPath(ps.path());
|
||||
QVERIFY(p.isValid());
|
||||
}
|
||||
|
||||
void PackageStructureTest::copyPerformance()
|
||||
{
|
||||
// seed the cache first
|
||||
|
@ -29,6 +29,8 @@ class PackageStructureTest : public QObject
|
||||
|
||||
private Q_SLOTS:
|
||||
void initTestCase();
|
||||
void validStructures();
|
||||
void validPackages();
|
||||
void copyPerformance();
|
||||
void mutateAfterCopy();
|
||||
void emptyContentsPrefix();
|
||||
|
Loading…
Reference in New Issue
Block a user