[kalarmcal] /: Reenable tests
Albert Astals Cid
null at kde.org
Thu May 17 21:11:00 UTC 2018
Git commit 76a425219eb554d437d526c05a09f7786d23eef4 by Albert Astals Cid.
Committed on 17/05/2018 at 21:10.
Pushed by aacid into branch 'master'.
Reenable tests
CCMAIL: release-team at kde.org
CCMAIL: kde-pim at kde.org
M +3 -3 CMakeLists.txt
M +6 -6 autotests/kaeventtest.cpp
https://commits.kde.org/kalarmcal/76a425219eb554d437d526c05a09f7786d23eef4
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3ceaf1b..cb12fc9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -54,9 +54,9 @@ add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
add_subdirectory(src)
add_subdirectory(serializers)
-#if(BUILD_TESTING)
-# add_subdirectory(autotests)
-#endif()
+if(BUILD_TESTING)
+ add_subdirectory(autotests)
+endif()
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5AlarmCalendar")
diff --git a/autotests/kaeventtest.cpp b/autotests/kaeventtest.cpp
index 4c50390..5ad5ecb 100644
--- a/autotests/kaeventtest.cpp
+++ b/autotests/kaeventtest.cpp
@@ -598,7 +598,7 @@ void KAEventTest::fromKCalEvent()
kcalevent->setRevision(273);
KAEvent event(kcalevent);
QCOMPARE(event.category(), CalEvent::ACTIVE);
- QCOMPARE(event.startDateTime(), dt);
+ QCOMPARE(event.startDateTime(), KAlarmCal::DateTime(dt));
QCOMPARE(event.createdDateTime().qDateTime(), createdDt);
QCOMPARE(event.id(), uid);
QCOMPARE(event.revision(), 273);
@@ -611,7 +611,7 @@ void KAEventTest::fromKCalEvent()
kcalevent->setCustomProperty("KALARM", "FLAGS", QStringLiteral("LOCAL"));
KAEvent event(kcalevent);
QCOMPARE(event.category(), CalEvent::ACTIVE);
- QCOMPARE(event.startDateTime(), dtLocal);
+ QCOMPARE(event.startDateTime(), KAlarmCal::DateTime(dtLocal));
QCOMPARE(event.createdDateTime().qDateTime(), createdDt);
}
{
@@ -859,7 +859,7 @@ void KAEventTest::fromKCalEvent()
KAEvent event(kcalevent);
QVERIFY(!event.emailBcc());
QCOMPARE(event.templateAfterTime(), 31);
- QCOMPARE(event.kmailSerialNumber(), 0);
+ QCOMPARE(event.kmailSerialNumber(), static_cast<unsigned long>(0));
}
{
// KMail serial number, with alarm message in email format
@@ -869,14 +869,14 @@ void KAEventTest::fromKCalEvent()
kcalalarm->setText(QStringLiteral("From: a at b.c\nTo: d at e.f\nDate: Sun, 01 Apr 2018 17:36:06 +0100\nSubject: About this"));
KAEvent event(kcalevent);
QCOMPARE(event.templateAfterTime(), -1);
- QCOMPARE(event.kmailSerialNumber(), 759231);
+ QCOMPARE(event.kmailSerialNumber(), static_cast<unsigned long>(759231));
}
{
// KMail serial number, with alarm message in wrong format
Event::Ptr kcalevent = createKcalEvent(dt.qDateTime(), createdDt);
kcalevent->setCustomProperty("KALARM", "FLAGS", QStringLiteral("KMAIL;759231"));
KAEvent event(kcalevent);
- QCOMPARE(event.kmailSerialNumber(), 0);
+ QCOMPARE(event.kmailSerialNumber(), static_cast<unsigned long>(0));
}
// Alarm custom properties
@@ -1200,7 +1200,7 @@ void KAEventTest::fromKCalEvent()
Event::Ptr kcalevent = createKcalEvent(dt.qDateTime(), createdDt, kcalalarm, Alarm::Email);
kcalalarm->setCustomProperty("KALARM", "FLAGS", QStringLiteral("EMAILID;2589"));
KAEvent event(kcalevent);
- QCOMPARE(event.emailFromId(), 2589);
+ QCOMPARE(event.emailFromId(), static_cast<unsigned long>(2589));
}
{
// Archived repeat-at-login
More information about the release-team
mailing list