@@ -20,7 +20,6 @@
20#include "launcherbackend.h"
20#include "launcherbackend.h"
22#include <QtTest>
22#include <QtTest>
25class LauncherBackendTest : public QObject
24class LauncherBackendTest : public QObject
@@ -31,29 +30,29 @@ private Q_SLOTS:
32 LauncherBackend backend(false);
31 LauncherBackend backend(false);
34− backend.setStoredApplications(QStringList() << "relative.path" << "/full/path");
33+ backend.setStoredApplications(QStringList() << "rel-icon.desktop" << "abs-icon" << "invalid");
35− QCOMPARE(backend.storedApplications(), QStringList() << "relative.path" << "/full/path");
34+ QCOMPARE(backend.storedApplications(), QStringList() << "rel-icon.desktop" << "abs-icon");
38 void testPinning()
37 void testPinning()
40 LauncherBackend backend(false);
39 LauncherBackend backend(false);
42− backend.setStoredApplications(QStringList() << "one" << "two");
41+ backend.setStoredApplications(QStringList() << "rel-icon" << "abs-icon");
43− QCOMPARE(backend.isPinned("one"), false);
42+ QCOMPARE(backend.isPinned("rel-icon"), false);
44− QCOMPARE(backend.isPinned("two"), false);
43+ QCOMPARE(backend.isPinned("abs-icon"), false);
46− backend.setPinned("two", true);
45+ backend.setPinned("rel-icon", true);
47− QCOMPARE(backend.isPinned("two"), true);
46+ QCOMPARE(backend.isPinned("rel-icon"), true);
49− backend.setStoredApplications(QStringList() << "one" << "two" << "three");
48+ backend.setStoredApplications(QStringList() << "rel-icon" << "abs-icon" << "no-name");
50− QCOMPARE(backend.isPinned("two"), true);
49+ QCOMPARE(backend.isPinned("rel-icon"), true);
51− QCOMPARE(backend.isPinned("three"), false);
50+ QCOMPARE(backend.isPinned("no-name"), false);
53− backend.setPinned("three", true);
52+ backend.setPinned("no-name", true);
54− backend.setStoredApplications(QStringList() << "one" << "two");
53+ backend.setStoredApplications(QStringList() << "rel-icon" << "abs-icon");
55− QCOMPARE(backend.isPinned("two"), true);
54+ QCOMPARE(backend.isPinned("rel-icon"), true);
56− QCOMPARE(backend.isPinned("three"), false); // doesn't exist anymore!
55+ QCOMPARE(backend.isPinned("no-name"), false); // doesn't exist anymore!