diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-02-19 18:02:22 +0000 |
---|---|---|
committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-02-19 18:02:22 +0000 |
commit | 359764b5ea8926ae372844155b1394ebe06e3174 (patch) | |
tree | ae60e379a905cc017bc323e79cdc62d2d37c1177 /tests/test-planner.cpp | |
parent | 372b0a77f8840a35bb131ecf507313056170c403 (diff) | |
parent | 29ca2a552d7a7dcb6487c27ae4d036608aa68320 (diff) | |
download | ayatana-indicator-datetime-359764b5ea8926ae372844155b1394ebe06e3174.tar.gz ayatana-indicator-datetime-359764b5ea8926ae372844155b1394ebe06e3174.tar.bz2 ayatana-indicator-datetime-359764b5ea8926ae372844155b1394ebe06e3174.zip |
support for ubuntu-clock-app's alarms Fixes: 1233176, 1237752, 1255716
Diffstat (limited to 'tests/test-planner.cpp')
-rw-r--r-- | tests/test-planner.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/test-planner.cpp b/tests/test-planner.cpp index b476ee8..1923ba1 100644 --- a/tests/test-planner.cpp +++ b/tests/test-planner.cpp @@ -28,9 +28,7 @@ #include <langinfo.h> #include <locale.h> -using unity::indicator::datetime::Appointment; -using unity::indicator::datetime::DateTime; -using unity::indicator::datetime::PlannerEds; +using namespace unity::indicator::datetime; /*** **** @@ -40,11 +38,15 @@ typedef GlibFixture PlannerFixture; TEST_F(PlannerFixture, EDS) { - PlannerEds planner; + auto tmp = g_date_time_new_now_local(); + const auto now = DateTime(tmp); + g_date_time_unref(tmp); + + std::shared_ptr<Clock> clock(new MockClock(now)); + PlannerEds planner(clock); wait_msec(100); - auto now = g_date_time_new_now_local(); - planner.time.set(DateTime(now)); + planner.time.set(now); wait_msec(2500); std::vector<Appointment> this_month = planner.this_month.get(); |