diff options
author | Renato Araujo Oliveira Filho <renato.filho@canonical.com> | 2016-03-31 15:51:29 -0300 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2021-07-05 01:41:04 +0200 |
commit | b1031b1de834f246bba806cd51bfbb22f5c15b16 (patch) | |
tree | 721bedfc5523c1f124c32e850bdb3354928ec011 /tests | |
parent | 7965d5b411db00de44f5c43dffac935e70347ec6 (diff) | |
download | ayatana-indicator-datetime-b1031b1de834f246bba806cd51bfbb22f5c15b16.tar.gz ayatana-indicator-datetime-b1031b1de834f246bba806cd51bfbb22f5c15b16.tar.bz2 ayatana-indicator-datetime-b1031b1de834f246bba806cd51bfbb22f5c15b16.zip |
Remove type property from Alarm.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/manual-test-snap.cpp | 2 | ||||
-rw-r--r-- | tests/notification-fixture.h | 4 | ||||
-rw-r--r-- | tests/test-alarm-queue.cpp | 4 | ||||
-rw-r--r-- | tests/test-eds-ics-missing-trigger.cpp | 1 | ||||
-rw-r--r-- | tests/test-eds-ics-nonrepeating-events.cpp | 2 | ||||
-rw-r--r-- | tests/test-eds-ics-repeating-events.cpp | 16 | ||||
-rw-r--r-- | tests/test-eds-ics-repeating-valarms.cpp | 16 | ||||
-rw-r--r-- | tests/test-eds-ics-tzids-2.cpp | 2 |
8 files changed, 23 insertions, 24 deletions
diff --git a/tests/manual-test-snap.cpp b/tests/manual-test-snap.cpp index 1479ef9..a0f80f2 100644 --- a/tests/manual-test-snap.cpp +++ b/tests/manual-test-snap.cpp @@ -71,7 +71,7 @@ int main(int argc, const char* argv[]) a.type = Appointment::UBUNTU_ALARM; a.begin = DateTime::Local(2014, 12, 25, 0, 0, 0); a.end = a.begin.end_of_day(); - a.alarms.push_back(Alarm{Alarm::SOUND, "Alarm Text", "", a.begin}); + a.alarms.push_back(Alarm{"Alarm Text", "", a.begin}); auto loop = g_main_loop_new(nullptr, false); auto on_snooze = [loop](const Appointment& appt, const Alarm&){ diff --git a/tests/notification-fixture.h b/tests/notification-fixture.h index 40f7cee..29066c0 100644 --- a/tests/notification-fixture.h +++ b/tests/notification-fixture.h @@ -111,7 +111,7 @@ protected: const auto christmas = ayatana::indicator::datetime::DateTime::Local(2015,12,25,0,0,0); appt.begin = christmas.start_of_day(); appt.end = christmas.end_of_day(); - appt.alarms.push_back(ayatana::indicator::datetime::Alarm{ayatana::indicator::datetime::Alarm::SOUND, "Ho Ho Ho!", "", appt.begin }); + appt.alarms.push_back(ayatana::indicator::datetime::Alarm{"Ho Ho Ho!", "", appt.begin }); // init a Lomiri Alarm ualarm.color = "red"; @@ -121,7 +121,7 @@ protected: const auto tomorrow = ayatana::indicator::datetime::DateTime::NowLocal().add_days(1); ualarm.begin = tomorrow; ualarm.end = tomorrow; - ualarm.alarms.push_back(ayatana::indicator::datetime::Alarm{ayatana::indicator::datetime::Alarm::SOUND, "It's Tomorrow!", "", appt.begin}); + ualarm.alarms.push_back(ayatana::indicator::datetime::Alarm{"It's Tomorrow!", "", appt.begin}); /// /// Add the AccountsService mock diff --git a/tests/test-alarm-queue.cpp b/tests/test-alarm-queue.cpp index 49bd933..42edf74 100644 --- a/tests/test-alarm-queue.cpp +++ b/tests/test-alarm-queue.cpp @@ -79,7 +79,7 @@ protected: a1.type = Appointment::UBUNTU_ALARM; a1.begin = tomorrow_begin; a1.end = tomorrow_end; - a1.alarms.push_back(Alarm{Alarm::SOUND, "Alarm Text", "", a1.begin}); + a1.alarms.push_back(Alarm{"Alarm Text", "", a1.begin}); const auto ubermorgen_begin = now.add_days(2).start_of_day(); const auto ubermorgen_end = ubermorgen_begin.end_of_day(); @@ -92,7 +92,7 @@ protected: a2.type = Appointment::EVENT; a2.begin = ubermorgen_begin; a2.end = ubermorgen_end; - a2.alarms.push_back(Alarm{Alarm::SOUND, "Alarm Text", "", a2.begin}); + a2.alarms.push_back(Alarm{"Alarm Text", "", a2.begin}); return std::vector<Appointment>({a1, a2}); } diff --git a/tests/test-eds-ics-missing-trigger.cpp b/tests/test-eds-ics-missing-trigger.cpp index 3894569..0aa00c6 100644 --- a/tests/test-eds-ics-missing-trigger.cpp +++ b/tests/test-eds-ics-missing-trigger.cpp @@ -91,7 +91,6 @@ TEST_F(VAlarmFixture, MissingTriggers) a.alarms[0].audio_url = "file://" ALARM_DEFAULT_SOUND; a.alarms[0].time = a.begin; a.alarms[0].text = a.summary; - a.alarms[0].type = Alarm::SOUND | Alarm::TEXT; expected.push_back(a); // build expected: recurring alarm diff --git a/tests/test-eds-ics-nonrepeating-events.cpp b/tests/test-eds-ics-nonrepeating-events.cpp index fe0d851..ff0ef3f 100644 --- a/tests/test-eds-ics-nonrepeating-events.cpp +++ b/tests/test-eds-ics-nonrepeating-events.cpp @@ -84,7 +84,7 @@ TEST_F(VAlarmFixture, MultipleAppointments) expected_appt.color = "#becedd"; expected_appt.summary = "Alarm"; std::array<Alarm,1> expected_alarms = { - Alarm({Alarm::SOUND | Alarm::TEXT, "Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,5,20,20,00,0)}) + Alarm({"Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,5,20,20,00,0)}) }; // compare it to what we actually loaded... diff --git a/tests/test-eds-ics-repeating-events.cpp b/tests/test-eds-ics-repeating-events.cpp index cdc0bbc..5d2a2ee 100644 --- a/tests/test-eds-ics-repeating-events.cpp +++ b/tests/test-eds-ics-repeating-events.cpp @@ -84,14 +84,14 @@ TEST_F(VAlarmFixture, MultipleAppointments) expected_appt.color = "#becedd"; expected_appt.summary = "Alarm"; std::array<Alarm,8> expected_alarms = { - Alarm({Alarm::SOUND | Alarm::TEXT, "Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,5, 8,16,40,0)}), - Alarm({Alarm::SOUND | Alarm::TEXT, "Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,5,15,16,40,0)}), - Alarm({Alarm::SOUND | Alarm::TEXT, "Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,5,22,16,40,0)}), - Alarm({Alarm::SOUND | Alarm::TEXT, "Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,5,29,16,40,0)}), - Alarm({Alarm::SOUND | Alarm::TEXT, "Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,6, 5,16,40,0)}), - Alarm({Alarm::SOUND | Alarm::TEXT, "Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,6,12,16,40,0)}), - Alarm({Alarm::SOUND | Alarm::TEXT, "Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,6,19,16,40,0)}), - Alarm({Alarm::SOUND | Alarm::TEXT, "Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,6,26,16,40,0)}) + Alarm({"Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,5, 8,16,40,0)}), + Alarm({"Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,5,15,16,40,0)}), + Alarm({"Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,5,22,16,40,0)}), + Alarm({"Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,5,29,16,40,0)}), + Alarm({"Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,6, 5,16,40,0)}), + Alarm({"Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,6,12,16,40,0)}), + Alarm({"Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,6,19,16,40,0)}), + Alarm({"Alarm", "file://" ALARM_DEFAULT_SOUND, DateTime(gtz,2015,6,26,16,40,0)}) }; // compare it to what we actually loaded... diff --git a/tests/test-eds-ics-repeating-valarms.cpp b/tests/test-eds-ics-repeating-valarms.cpp index 49ec41b..4f53e68 100644 --- a/tests/test-eds-ics-repeating-valarms.cpp +++ b/tests/test-eds-ics-repeating-valarms.cpp @@ -83,14 +83,14 @@ TEST_F(VAlarmFixture, MultipleAppointments) ASSERT_EQ(1, appts.size()); const auto& appt = appts.front(); ASSERT_EQ(8, appt.alarms.size()); - EXPECT_EQ(Alarm({Alarm::SOUND | Alarm::TEXT, "Time to pack!", "", DateTime(gtz,2015,4,23,13,35,0)}), appt.alarms[0]); - EXPECT_EQ(Alarm({Alarm::SOUND | Alarm::TEXT, "Time to pack!", "", DateTime(gtz,2015,4,23,13,37,0)}), appt.alarms[1]); - EXPECT_EQ(Alarm({Alarm::SOUND | Alarm::TEXT, "Time to pack!", "", DateTime(gtz,2015,4,23,13,39,0)}), appt.alarms[2]); - EXPECT_EQ(Alarm({Alarm::SOUND | Alarm::TEXT, "Time to pack!", "", DateTime(gtz,2015,4,23,13,41,0)}), appt.alarms[3]); - EXPECT_EQ(Alarm({Alarm::SOUND | Alarm::TEXT, "Go to the airport!", "", DateTime(gtz,2015,4,24,10,35,0)}), appt.alarms[4]); - EXPECT_EQ(Alarm({Alarm::SOUND | Alarm::TEXT, "Go to the airport!", "", DateTime(gtz,2015,4,24,10,37,0)}), appt.alarms[5]); - EXPECT_EQ(Alarm({Alarm::SOUND | Alarm::TEXT, "Go to the airport!", "", DateTime(gtz,2015,4,24,10,39,0)}), appt.alarms[6]); - EXPECT_EQ(Alarm({Alarm::SOUND | Alarm::TEXT, "Go to the airport!", "", DateTime(gtz,2015,4,24,10,41,0)}), appt.alarms[7]); + EXPECT_EQ(Alarm({"Time to pack!", "", DateTime(gtz,2015,4,23,13,35,0)}), appt.alarms[0]); + EXPECT_EQ(Alarm({"Time to pack!", "", DateTime(gtz,2015,4,23,13,37,0)}), appt.alarms[1]); + EXPECT_EQ(Alarm({"Time to pack!", "", DateTime(gtz,2015,4,23,13,39,0)}), appt.alarms[2]); + EXPECT_EQ(Alarm({"Time to pack!", "", DateTime(gtz,2015,4,23,13,41,0)}), appt.alarms[3]); + EXPECT_EQ(Alarm({"Go to the airport!", "", DateTime(gtz,2015,4,24,10,35,0)}), appt.alarms[4]); + EXPECT_EQ(Alarm({"Go to the airport!", "", DateTime(gtz,2015,4,24,10,37,0)}), appt.alarms[5]); + EXPECT_EQ(Alarm({"Go to the airport!", "", DateTime(gtz,2015,4,24,10,39,0)}), appt.alarms[6]); + EXPECT_EQ(Alarm({"Go to the airport!", "", DateTime(gtz,2015,4,24,10,41,0)}), appt.alarms[7]); // now let's try this out with AlarmQueue... // hook the planner up to a SimpleAlarmQueue and confirm that it triggers for each of the reminders diff --git a/tests/test-eds-ics-tzids-2.cpp b/tests/test-eds-ics-tzids-2.cpp index b1a344a..c8b0370 100644 --- a/tests/test-eds-ics-tzids-2.cpp +++ b/tests/test-eds-ics-tzids-2.cpp @@ -86,7 +86,7 @@ TEST_F(VAlarmFixture, MultipleAppointments) 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>{ Alarm({Alarm::TEXT, "Reminder", "", DateTime(gtz,2014,1,21,10,45,0)}) }; + appt->alarms = std::vector<Alarm>{ Alarm({"Reminder", "", DateTime(gtz,2014,1,21,10,45,0)}) }; // compare it to what we actually loaded... const auto appts = planner->appointments().get(); |