From 363fa27904d729ecec2aa2948b72d44e318e1654 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Mon, 18 May 2020 08:24:35 +0200 Subject: [PATCH] Start create autotest --- src/CMakeLists.txt | 1 + src/job/autotests/CMakeLists.txt | 10 ++++++ .../autotests/createreplymessagejobtest.cpp | 28 +++++++++++++++ src/job/autotests/createreplymessagejobtest.h | 34 +++++++++++++++++++ 4 files changed, 73 insertions(+) create mode 100644 src/job/autotests/CMakeLists.txt create mode 100644 src/job/autotests/createreplymessagejobtest.cpp create mode 100644 src/job/autotests/createreplymessagejobtest.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 42e67ce2d..59cf80a1a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -416,6 +416,7 @@ if(BUILD_TESTING) add_subdirectory(editor/warningwidgets/autotests) add_subdirectory(sieveimapinterface/tests/) add_subdirectory(undosend/autotests/) + add_subdirectory(job/autotests/) endif() ########### install files ############### diff --git a/src/job/autotests/CMakeLists.txt b/src/job/autotests/CMakeLists.txt new file mode 100644 index 000000000..02e161e09 --- /dev/null +++ b/src/job/autotests/CMakeLists.txt @@ -0,0 +1,10 @@ +macro(add_kmail_job_unittest _source) + get_filename_component(_name ${_source} NAME_WE) + ecm_add_test(${_source} + TEST_NAME ${_name} + LINK_LIBRARIES kmailprivate Qt5::Test Qt5::Widgets + ) +endmacro () + +add_kmail_job_unittest(createreplymessagejobtest.cpp) + diff --git a/src/job/autotests/createreplymessagejobtest.cpp b/src/job/autotests/createreplymessagejobtest.cpp new file mode 100644 index 000000000..7bb313008 --- /dev/null +++ b/src/job/autotests/createreplymessagejobtest.cpp @@ -0,0 +1,28 @@ +/* + Copyright (C) 2020 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "createreplymessagejobtest.h" +#include +QTEST_MAIN(CreateReplyMessageJobTest) + +CreateReplyMessageJobTest::CreateReplyMessageJobTest(QObject *parent) + : QObject(parent) +{ + +} diff --git a/src/job/autotests/createreplymessagejobtest.h b/src/job/autotests/createreplymessagejobtest.h new file mode 100644 index 000000000..ad347aa97 --- /dev/null +++ b/src/job/autotests/createreplymessagejobtest.h @@ -0,0 +1,34 @@ +/* + Copyright (C) 2020 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + + +#ifndef CREATEREPLYMESSAGEJOBTEST_H +#define CREATEREPLYMESSAGEJOBTEST_H + +#include + +class CreateReplyMessageJobTest : public QObject +{ + Q_OBJECT +public: + explicit CreateReplyMessageJobTest(QObject *parent = nullptr); + ~CreateReplyMessageJobTest() = default; +}; + +#endif // CREATEREPLYMESSAGEJOBTEST_H