Commit 7c0222f8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add more test

parent d09190cf
......@@ -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)
......@@ -31,6 +31,7 @@ public:
private Q_SLOTS:
void shouldHaveDefaultValue();
void shouldGetSaveInfo();
void shouldGetSaveInfo_data();
};
#endif // VIEWERPLUGINEXTERNALEDITWIDGETTEST_H
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment