diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2015-03-16 21:07:54 +0100 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2015-03-16 21:07:54 +0100 |
commit | 273c3b3829c9a3e853d0b6b0a32ae87cc3c6852b (patch) | |
tree | e3c2859c54b0bba9c72ad221ea41c95ed8f5a70f /tests/test-snap.cpp | |
parent | 67510bd5a582762648a96d7b42024c4f181ece8e (diff) | |
download | ayatana-indicator-datetime-273c3b3829c9a3e853d0b6b0a32ae87cc3c6852b.tar.gz ayatana-indicator-datetime-273c3b3829c9a3e853d0b6b0a32ae87cc3c6852b.tar.bz2 ayatana-indicator-datetime-273c3b3829c9a3e853d0b6b0a32ae87cc3c6852b.zip |
add DateTime::end_of_month(), DateTime::end_of_day(). Add unit tests for them.
Diffstat (limited to 'tests/test-snap.cpp')
-rw-r--r-- | tests/test-snap.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test-snap.cpp b/tests/test-snap.cpp index e7161d3..3dd4501 100644 --- a/tests/test-snap.cpp +++ b/tests/test-snap.cpp @@ -109,10 +109,9 @@ protected: appt.url = "alarm:///hello-world"; appt.uid = "D4B57D50247291478ED31DED17FF0A9838DED402"; appt.type = Appointment::EVENT; - auto begin = DateTime::Local(2014,12,25,0,0,0); - auto end = begin.add_full(0,0,1,0,0,-1); - appt.begin = begin; - appt.end = end; + const auto christmas = DateTime::Local(2015,12,25,0,0,0); + appt.begin = christmas.start_of_day(); + appt.end = christmas.end_of_day(); service = dbus_test_service_new(nullptr); |