Commit 1365c1ea authored by Laurent Montel's avatar Laurent Montel 😁

Add autotests

parent d49d2879
......@@ -18,10 +18,23 @@
*/
#include "languagetoolresultwidgettest.h"
#include "languagetoolresultwidget.h"
#include <QTest>
#include <QHBoxLayout>
#include <grammarresulttextedit.h>
QTEST_MAIN(LanguagetoolResultWidgetTest)
LanguagetoolResultWidgetTest::LanguagetoolResultWidgetTest(QObject *parent)
: QObject(parent)
{
}
void LanguagetoolResultWidgetTest::shouldHaveDefaultValue()
{
LanguagetoolResultWidget w;
QHBoxLayout *mainLayout = w.findChild<QHBoxLayout *>(QStringLiteral("mainlayout"));
QVERIFY(mainLayout);
QCOMPARE(mainLayout->margin(), 0);
GrammarResultTextEdit *mResult = w.findChild<GrammarResultTextEdit *>(QStringLiteral("grammarResult"));
QVERIFY(mResult);
}
......@@ -27,6 +27,8 @@ class LanguagetoolResultWidgetTest : public QObject
public:
explicit LanguagetoolResultWidgetTest(QObject *parent = nullptr);
~LanguagetoolResultWidgetTest() = default;
private Q_SLOTS:
void shouldHaveDefaultValue();
};
#endif // LANGUAGETOOLRESULTWIDGETTEST_H
Markdown is supported
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