Commit 3f80d356 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add autotest

parent dca6caa2
Pipeline #122241 passed with stage
in 14 minutes and 3 seconds
# SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
# SPDX-License-Identifier: BSD-3-Clause
macro(add_messageviewer_openwithurl_unittest _source)
get_filename_component(_name ${_source} NAME_WE)
ecm_add_test(${_source}
TEST_NAME ${_name}
NAME_PREFIX "messageviewer-"
LINK_LIBRARIES KF5::MessageViewer openurlwithconfigure Qt${QT_MAJOR_VERSION}::Test
)
endmacro ()
add_messageviewer_openwithurl_unittest(openurlwithconfigurewidgettest.cpp)
/*
SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "openurlwithconfigurewidgettest.h"
#include "openurlwithconfigurewidget.h"
#include <QTest>
QTEST_MAIN(OpenUrlWithConfigureWidgetTest)
OpenUrlWithConfigureWidgetTest::OpenUrlWithConfigureWidgetTest(QObject *parent)
: QObject{parent}
{
}
void OpenUrlWithConfigureWidgetTest::shouldHaveDefaultValues()
{
OpenUrlWithConfigureWidget w;
// TODO
}
/*
SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <QObject>
class OpenUrlWithConfigureWidgetTest : public QObject
{
Q_OBJECT
public:
explicit OpenUrlWithConfigureWidgetTest(QObject *parent = nullptr);
~OpenUrlWithConfigureWidgetTest() override = default;
private Q_SLOTS:
void shouldHaveDefaultValues();
};
......@@ -5,10 +5,14 @@
*/
#include "openurlwithconfigurewidget.h"
#include <KLocalizedString>
#include <QVBoxLayout>
OpenUrlWithConfigureWidget::OpenUrlWithConfigureWidget(QWidget *parent)
: QWidget{parent}
{
auto mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainLayout"));
mainLayout->setContentsMargins(QMargins());
}
OpenUrlWithConfigureWidget::~OpenUrlWithConfigureWidget()
......
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