diff --git a/tests/testAppletInfo.cpp b/tests/testAppletInfo.cpp index 5a025aa1d..a4626dfc2 100644 --- a/tests/testAppletInfo.cpp +++ b/tests/testAppletInfo.cpp @@ -215,5 +215,35 @@ void TestAppletInfo::hidden() COMPARE(expected, actual); } +void TestAppletInfo::assignment() +{ + Plasma::AppletInfo assigned = *notUniqueNative; + COMPARE(assigned.name(), notUniqueNative->name()); + COMPARE(assigned.comment(), notUniqueNative->comment()); + COMPARE(assigned.icon(), notUniqueNative->icon()); + COMPARE(assigned.library(), notUniqueNative->library()); + COMPARE(assigned.languageBindings(), notUniqueNative->languageBindings()); + COMPARE(assigned.desktopFilePath(), notUniqueNative->desktopFilePath()); + COMPARE(assigned.desktopFile(), notUniqueNative->desktopFile()); + COMPARE(assigned.unique(), notUniqueNative->unique()); + COMPARE(assigned.hidden(), notUniqueNative->hidden()); +} + +void TestAppletInfo::copyConstructor() +{ + Plasma::AppletInfo* tempCopy = new Plasma::AppletInfo(*notUniqueNative); + Plasma::AppletInfo copied(*tempCopy); + delete tempCopy; + COMPARE(copied.name(), notUniqueNative->name()); + COMPARE(copied.comment(), notUniqueNative->comment()); + COMPARE(copied.icon(), notUniqueNative->icon()); + COMPARE(copied.library(), notUniqueNative->library()); + COMPARE(copied.languageBindings(), notUniqueNative->languageBindings()); + COMPARE(copied.desktopFilePath(), notUniqueNative->desktopFilePath()); + COMPARE(copied.desktopFile(), notUniqueNative->desktopFile()); + COMPARE(copied.unique(), notUniqueNative->unique()); + COMPARE(copied.hidden(), notUniqueNative->hidden()); +} + QTTEST_MAIN(TestAppletInfo) #include "testAppletInfo.moc" diff --git a/tests/testAppletInfo.h b/tests/testAppletInfo.h index c016bd1d3..6b0044bf6 100644 --- a/tests/testAppletInfo.h +++ b/tests/testAppletInfo.h @@ -56,6 +56,8 @@ class TestAppletInfo: public QObject void unique(); void hidden_data(QtTestTable& t); void hidden(); + void assignment(); + void copyConstructor(); private: Plasma::AppletInfo* notUniqueNative; diff --git a/tests/uniqueJavaScriptApplet.desktop b/tests/uniqueJavaScriptApplet.desktop index c6380029c..c7b751c8b 100644 --- a/tests/uniqueJavaScriptApplet.desktop +++ b/tests/uniqueJavaScriptApplet.desktop @@ -4,6 +4,7 @@ Encoding=UTF-8 Name=Unique Javascript Applet Comment=An applet written in JavaScript Icon=javascript +Hidden=true X-KDE-Library=plasma_applet_javascript X-KDE-LanguageBindings=JavaScript