aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vrátil <[email protected]>2018-03-07 22:14:30 +0100
committerDaniel Vrátil <[email protected]>2018-03-07 22:14:30 +0100
commit493b6b3c2bc928e842c9e46fec4809082717a27c (patch)
treebf96a534dcbe90aad504e4b65c52853ae39d90be
parent04fb5189a4032facb2c32cbd89d7b3498b28375c (diff)
Fix unittest build
-rw-r--r--autotests/CMakeLists.txt4
-rw-r--r--autotests/mailserializerplugintest.cpp2
-rw-r--r--autotests/mailserializertest.cpp10
3 files changed, 12 insertions, 4 deletions
diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt
index 382ef1a..39ff216 100644
--- a/autotests/CMakeLists.txt
+++ b/autotests/CMakeLists.txt
@@ -59,7 +59,9 @@ ecm_add_test(mailserializerplugintest.cpp ${CMAKE_BINARY_DIR}/serializers/akonad
LINK_LIBRARIES KF5::AkonadiMime KF5::AkonadiCore KF5::AkonadiPrivate KF5::Mime Qt5::Test
TEST_NAME mailserializerplugintest
)
-ecm_add_test(mailserializertest.cpp ${CMAKE_BINARY_DIR}/serializers/akonadi_serializer_mail_debug.cpp
+ecm_add_test(mailserializertest.cpp
+ ${CMAKE_SOURCE_DIR}/serializers/akonadi_serializer_mail.cpp
+ ${CMAKE_BINARY_DIR}/serializers/akonadi_serializer_mail_debug.cpp
LINK_LIBRARIES KF5::AkonadiMime KF5::AkonadiCore KF5::AkonadiPrivate KF5::Mime Qt5::Test
TEST_NAME mailserializertest
)
diff --git a/autotests/mailserializerplugintest.cpp b/autotests/mailserializerplugintest.cpp
index 0a7793f..8df86d7 100644
--- a/autotests/mailserializerplugintest.cpp
+++ b/autotests/mailserializerplugintest.cpp
@@ -25,7 +25,7 @@
#include <QDebug>
#include <QTest>
-QTEST_MAIN(MailSerializerPluginTest)
+QTEST_GUILESS_MAIN(MailSerializerPluginTest)
using namespace Akonadi;
using namespace KMime;
diff --git a/autotests/mailserializertest.cpp b/autotests/mailserializertest.cpp
index c4f24ef..e2874c2 100644
--- a/autotests/mailserializertest.cpp
+++ b/autotests/mailserializertest.cpp
@@ -19,13 +19,19 @@
#include "mailserializertest.h"
-#include "../serializers/akonadi_serializer_mail.cpp"
+#include "../serializers/akonadi_serializer_mail.h"
#include "../src/messageflags.h"
+#include "../src/messageparts.h"
+
+#include <KMime/Message>
#include <qtest.h>
#include <QBuffer>
-QTEST_MAIN(MailSerializerTest)
+using namespace Akonadi;
+using namespace KMime;
+
+QTEST_GUILESS_MAIN(MailSerializerTest)
void MailSerializerTest::testEnvelopeDeserialize_data()
{