on xenial help sign in
Dbus encode/decode test
commit89023c3cc042ce30b414200c6b76f22debb65e04 authorTed Gould <ted@gould.cx> dateMon 14 Apr 2014, 12:41 (13 years ago) parentef92825
1 file changed+19
tests/plugins/Unity/Launcher/launcherbackendtest.cpp+19
tests/plugins/Unity/Launcher/launcherbackendtest.cpp+19
@@ -102,6 +102,25 @@ private Q_SLOTS:
102102
103103 QCOMPARE(backend.count(appId), expectedCount);
104104 }
105+
106+ void testDbusName_data() {
107+ QTest::addColumn<QString>("decoded");
108+ QTest::addColumn<QString>("encoded");
109+
110+ /* Passthrough test */
111+ QTest::newRow("Passthrough") << "fine" << "fine";
112+ }
113+
114+ void testDbusName() {
115+ QFETCH(QString, decoded);
116+ QFETCH(QString, encoded);
117+
118+ QString decodeOut = LauncherBackend::decodeAppId(encoded);
119+ QCOMPARE(decoded, decodeOut);
120+
121+ QString encodeOut = LauncherBackend::encodeAppId(encoded);
122+ QCOMPARE(encoded, encodeOut);
123+ }
105124};
106125
107126QTEST_GUILESS_MAIN(LauncherBackendTest)