Commit 190107b3 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add autotests

parent 4825f324
Pipeline #67606 canceled with stage
macro(add_kmail_checkbeforedeleting_unittest _source _additional)
set( _test ${_source} ${_additional} ${kmail_markdownplugin_debug_SRCS})
macro(add_kmail_checkbeforedeleting_unittest _source)
set( _test ${_source} ${kmail_markdownplugin_debug_SRCS})
get_filename_component(_name ${_source} NAME_WE)
add_executable( ${_name} ${_test} )
add_test(NAME ${_name} COMMAND ${_name} )
......@@ -7,3 +7,5 @@ macro(add_kmail_checkbeforedeleting_unittest _source _additional)
ecm_mark_as_test(kmail_checkbeforedeleting-${_name})
target_link_libraries( ${_name} Qt::Test KF5::XmlGui KF5::MessageViewer KF5::I18n kmailconfirmbeforedeleting)
endmacro ()
add_kmail_checkbeforedeleting_unittest(confirmbeforedeletingdialogtest.cpp)
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "confirmbeforedeletingdialogtest.h"
#include "confirmbeforedeletingdialog.h"
#include <QTest>
QTEST_MAIN(ConfirmBeforeDeletingDialogTest)
ConfirmBeforeDeletingDialogTest::ConfirmBeforeDeletingDialogTest(QObject *parent)
: QObject(parent)
{
}
void ConfirmBeforeDeletingDialogTest::shouldHaveDefaultValues()
{
ConfirmBeforeDeletingDialog d;
// TODO
}
/*
SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#pragma once
#include <QObject>
class ConfirmBeforeDeletingDialogTest : public QObject
{
Q_OBJECT
public:
explicit ConfirmBeforeDeletingDialogTest(QObject *parent = nullptr);
~ConfirmBeforeDeletingDialogTest() override = default;
private Q_SLOTS:
void shouldHaveDefaultValues();
};
......@@ -5,10 +5,10 @@
*/
#pragma once
#include "confirmbeforedeleting_private_export.h"
#include <QDialog>
class ConfirmBeforeDeletingWidget;
class ConfirmBeforeDeletingDialog : public QDialog
class KMAILCONFIRMBEFOREDELETING_TESTS_EXPORT ConfirmBeforeDeletingDialog : public QDialog
{
Q_OBJECT
public:
......
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