Commit 27ec874d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add plaintexteditfindbar autotest

parent 9fa678ec
......@@ -4,3 +4,8 @@ ecm_add_tests(plaintexteditortest.cpp
NAME_PREFIX "kpimtextedit-plaintexteditor-"
LINK_LIBRARIES KF5::PimTextEdit KF5::KIOWidgets Qt${QT_MAJOR_VERSION}::Test Qt${QT_MAJOR_VERSION}::Widgets
)
ecm_add_tests(plaintexteditfindbartest.cpp
NAME_PREFIX "kpimtextedit-plaintexteditor-"
LINK_LIBRARIES KF5::PimTextEdit KF5::KIOWidgets Qt${QT_MAJOR_VERSION}::Test Qt${QT_MAJOR_VERSION}::Widgets
)
/*
SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "plaintexteditfindbartest.h"
#include "texteditor/plaintexteditor/plaintexteditfindbar.h"
#include <QPlainTextEdit>
#include <QTest>
QTEST_MAIN(PlainTextEditFindBarTest)
PlainTextEditFindBarTest::PlainTextEditFindBarTest(QObject *parent)
: QObject{parent}
{
}
void PlainTextEditFindBarTest::shouldHaveDefaultValues()
{
QPlainTextEdit edit;
KPIMTextEdit::PlainTextEditFindBar w(&edit);
QVERIFY(w.text().isEmpty());
}
/*
SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#pragma once
#include <QObject>
class PlainTextEditFindBarTest : public QObject
{
Q_OBJECT
public:
explicit PlainTextEditFindBarTest(QObject *parent = nullptr);
~PlainTextEditFindBarTest() override = default;
private Q_SLOTS:
void shouldHaveDefaultValues();
};
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