From d77ad890a0bb3b8e366c6dea23ca93f71e35d5d5 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Thu, 1 Feb 2024 18:44:01 +0100 Subject: Fix tests relying on the default EDS appointment colour --- tests/test-eds-ics-tzids-2.cpp | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) (limited to 'tests/test-eds-ics-tzids-2.cpp') diff --git a/tests/test-eds-ics-tzids-2.cpp b/tests/test-eds-ics-tzids-2.cpp index 36ef0fe..1bef68b 100644 --- a/tests/test-eds-ics-tzids-2.cpp +++ b/tests/test-eds-ics-tzids-2.cpp @@ -1,6 +1,6 @@ /* * Copyright 2015 Canonical Ltd. - * Copyright 2021-2022 Robert Tari + * Copyright 2021-2024 Robert Tari * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -79,20 +79,35 @@ TEST_F(VAlarmFixture, MultipleAppointments) } // what we expect to get... - std::array expected_appts; - auto appt = &expected_appts[0]; - appt->uid = "109264742"; - appt->color = "#becedd"; - appt->summary = "National Incubator Initiative for Clean Energy (NIICE) FOA: Pre-Concept Paper Informational Webinar"; - appt->begin = DateTime{gtz,2014,1,21,11,0,0}; - appt->end = DateTime{gtz,2014,1,21,13,0,0}; - appt->alarms = std::vector{ Alarm({"Reminder", "", DateTime(gtz,2014,1,21,10,45,0)}) }; + std::array expected_appts1; + auto appt1 = &expected_appts1[0]; + appt1->uid = "109264742"; + appt1->color = "#becedd"; + appt1->summary = "National Incubator Initiative for Clean Energy (NIICE) FOA: Pre-Concept Paper Informational Webinar"; + appt1->begin = DateTime{gtz,2014,1,21,11,0,0}; + appt1->end = DateTime{gtz,2014,1,21,13,0,0}; + appt1->alarms = std::vector{ Alarm({"Reminder", "", DateTime(gtz,2014,1,21,10,45,0)}) }; + + std::array expected_appts2; + auto appt2 = &expected_appts2[0]; + appt2->uid = "109264742"; + appt2->color = "#62a0ea"; + appt2->summary = "National Incubator Initiative for Clean Energy (NIICE) FOA: Pre-Concept Paper Informational Webinar"; + appt2->begin = DateTime{gtz,2014,1,21,11,0,0}; + appt2->end = DateTime{gtz,2014,1,21,13,0,0}; + appt2->alarms = std::vector{ Alarm({"Reminder", "", DateTime(gtz,2014,1,21,10,45,0)}) }; // compare it to what we actually loaded... const auto appts = planner->appointments().get(); - EXPECT_EQ(expected_appts.size(), appts.size()); - for (size_t i=0, n=std::min(appts.size(),expected_appts.size()); i