diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2015-03-14 21:31:42 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2015-03-14 21:31:42 -0500 |
commit | c940b70c65b1550fe65dbad5841adfe906cf0cdf (patch) | |
tree | 141b128f526f719b09069e5b06e2ee0c9678bea7 /tests/test-menus.cpp | |
parent | db5b700c7c116c73283019b3fbf823a23639a405 (diff) | |
download | ayatana-indicator-datetime-c940b70c65b1550fe65dbad5841adfe906cf0cdf.tar.gz ayatana-indicator-datetime-c940b70c65b1550fe65dbad5841adfe906cf0cdf.tar.bz2 ayatana-indicator-datetime-c940b70c65b1550fe65dbad5841adfe906cf0cdf.zip |
use the new DateTime::start_of_day() and DateTime::start_of_minute() functions.
Diffstat (limited to 'tests/test-menus.cpp')
-rw-r--r-- | tests/test-menus.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/test-menus.cpp b/tests/test-menus.cpp index e0e63ac..fb9c50a 100644 --- a/tests/test-menus.cpp +++ b/tests/test-menus.cpp @@ -151,9 +151,7 @@ protected: // now change the clock and see if the date label changes appropriately - auto gdt_tomorrow = g_date_time_add_days(now.get(), 1); - auto tomorrow = DateTime(gdt_tomorrow); - g_date_time_unref(gdt_tomorrow); + auto tomorrow = now.add_days(1).start_of_day(); m_mock_state->mock_clock->set_localtime(tomorrow); wait_msec(); @@ -182,9 +180,7 @@ private: std::vector<Appointment> build_some_appointments() { const auto now = m_state->clock->localtime(); - auto gdt_tomorrow = g_date_time_add_days(now.get(), 1); - const auto tomorrow = DateTime(gdt_tomorrow); - g_date_time_unref(gdt_tomorrow); + const auto tomorrow = now.add_days(1); Appointment a1; // an alarm clock appointment a1.color = "red"; |