summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-29 05:39:19 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-29 05:39:19 (GMT)
commit7c0222f8aca77f8a9a130069d79692c816d95fe6 (patch)
tree70dbeaadf18ab403d74fde5ff5542610abf17ff5
parentd09190cf1e9ce70b13b9aa0ba7053c86c51ae0b9 (diff)
Add more test
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.cpp16
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.h1
2 files changed, 13 insertions, 4 deletions
diff --git a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.cpp b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.cpp
index 067190a..fee3f6e 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.cpp
+++ b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.cpp
@@ -55,16 +55,24 @@ void ViewerPluginExternalEditWidgetTest::shouldHaveDefaultValue()
QVERIFY(mExecutable);
}
-void ViewerPluginExternalEditWidgetTest::shouldGetSaveInfo()
+void ViewerPluginExternalEditWidgetTest::shouldGetSaveInfo_data()
{
- ViewerPluginExternalEditWidget w;
+ QTest::addColumn<ViewerPluginExternalScriptInfo>("scriptinfo");
ViewerPluginExternalScriptInfo info;
info.setCommandLine(QStringLiteral("foo"));
info.setDescription(QStringLiteral("blo"));
info.setExecutable(QStringLiteral("voo"));
info.setName(QStringLiteral("bla"));
- w.setScriptInfo(info);
- QCOMPARE(info, w.scriptInfo());
+ QTest::newRow("test1") << info;
+
+}
+
+void ViewerPluginExternalEditWidgetTest::shouldGetSaveInfo()
+{
+ QFETCH (ViewerPluginExternalScriptInfo, scriptinfo);
+ ViewerPluginExternalEditWidget w;
+ w.setScriptInfo(scriptinfo);
+ QCOMPARE(scriptinfo, w.scriptInfo());
}
QTEST_MAIN(ViewerPluginExternalEditWidgetTest)
diff --git a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.h b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.h
index 568e4ee..9e43b3a 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.h
+++ b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.h
@@ -31,6 +31,7 @@ public:
private Q_SLOTS:
void shouldHaveDefaultValue();
void shouldGetSaveInfo();
+ void shouldGetSaveInfo_data();
};
#endif // VIEWERPLUGINEXTERNALEDITWIDGETTEST_H