Commit 04d5e8a5 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Prepare autotests

parent 0eef3771
Pipeline #29697 failed with stage
in 8 minutes and 4 seconds
set(kaddressbook_importexport_windowscontact_debugfile_SRCS)
ecm_qt_declare_logging_category(kaddressbook_importexport_windowscontact_debugfile_SRCS HEADER importexportwindowscontactplugin_debug.h IDENTIFIER IMPORTEXPORTWINDOWSCONTACTPLUGIN_LOG CATEGORY_NAME org.kde.pim.importexportwindowscontactplugin
DESCRIPTION "kdepim-addons (Import/Export Windows Contact plugin)"
EXPORT KDEPIMADDONS
)
set(kaddressbook_importexport_windowscontact_SRCS
${kaddressbook_importexport_windowscontact_debugfile_SRCS}
windowscontactimportexportplugin.cpp
windowscontactimportexportplugininterface.cpp
importwindowcontact.cpp
)
ecm_qt_declare_logging_category(kaddressbook_importexport_windowscontact_SRCS HEADER importexportwindowscontactplugin_debug.h IDENTIFIER IMPORTEXPORTWINDOWSCONTACTPLUGIN_LOG CATEGORY_NAME org.kde.pim.importexportwindowscontactplugin
DESCRIPTION "kdepim-addons (Import/Export Windows Contact plugin)"
EXPORT KDEPIMADDONS
)
kcoreaddons_add_plugin(kaddressbook_importexportwindowscontactplugin JSON kaddressbook_importexportwindowscontactplugin.json SOURCES
${kaddressbook_importexport_windowscontact_SRCS} INSTALL_NAMESPACE kaddressbook/importexportplugin)
......@@ -23,3 +25,6 @@ target_link_libraries(kaddressbook_importexportwindowscontactplugin KF5::Kaddres
KF5::AkonadiCore
kaddressbookimportexportlibprivate
)
if(BUILD_TESTING)
add_subdirectory(autotests)
endif()
ecm_qt_declare_logging_category(kaddressbook_importexport_windowscontact_debugfile_autotest_SRCS HEADER importexportwindowscontactplugin_debug.h IDENTIFIER IMPORTEXPORTWINDOWSCONTACTPLUGIN_LOG CATEGORY_NAME org.kde.pim.importexportwindowscontactplugin
DESCRIPTION "kdepim-addons (Import/Export Windows Contact plugin)"
EXPORT KDEPIMADDONS
)
macro(add_windowscontact_unittest _source _additional)
set( _test ${_source} ${_additional} ${kaddressbook_importexport_windowscontact_debugfile_autotest_SRCS})
get_filename_component(_name ${_source} NAME_WE)
add_executable( ${_name} ${_test})
add_test(NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(${_name})
target_link_libraries( ${_name} Qt5::Widgets Qt5::Test KF5::I18n KF5::WidgetsAddons Qt5::Xml)
endmacro ()
add_windowscontact_unittest(importwindowcontacttest.cpp "../importwindowcontact.cpp")
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "importwindowcontacttest.h"
#include "../importwindowcontact.h"
#include <QTest>
QTEST_MAIN(ImportWindowContactTest)
ImportWindowContactTest::ImportWindowContactTest(QObject *parent)
: QObject(parent)
{
}
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef IMPORTWINDOWCONTACTTEST_H
#define IMPORTWINDOWCONTACTTEST_H
#include <QObject>
class ImportWindowContactTest : public QObject
{
Q_OBJECT
public:
explicit ImportWindowContactTest(QObject *parent = nullptr);
~ImportWindowContactTest() = default;
};
#endif // IMPORTWINDOWCONTACTTEST_H
......@@ -116,6 +116,7 @@ bool WindowsContactImportExportPluginInterface::canImportFileType(const QUrl &ur
void WindowsContactImportExportPluginInterface::importFile(const QUrl &url)
{
Q_UNUSED(url);
}
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