diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2015-03-17 15:23:49 +0000 |
---|---|---|
committer | CI Train Bot <ci-train-bot@canonical.com> | 2015-03-17 15:23:49 +0000 |
commit | ddde67df581dea8c5a261e43d5b12a3821f06ed1 (patch) | |
tree | e3c2859c54b0bba9c72ad221ea41c95ed8f5a70f /tests/test-planner.cpp | |
parent | 15ec7f61fa84a9a8b40c1c9fcfa6c2a268d3232b (diff) | |
parent | 273c3b3829c9a3e853d0b6b0a32ae87cc3c6852b (diff) | |
download | ayatana-indicator-datetime-ddde67df581dea8c5a261e43d5b12a3821f06ed1.tar.gz ayatana-indicator-datetime-ddde67df581dea8c5a261e43d5b12a3821f06ed1.tar.bz2 ayatana-indicator-datetime-ddde67df581dea8c5a261e43d5b12a3821f06ed1.zip |
Fix bug that prevented clicking on calendar days where DST sprang forward. Fixes: #1429388
Approved by: Ted Gould, PS Jenkins bot
Diffstat (limited to 'tests/test-planner.cpp')
-rw-r--r-- | tests/test-planner.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/test-planner.cpp b/tests/test-planner.cpp index 8f1590c..1e8ac66 100644 --- a/tests/test-planner.cpp +++ b/tests/test-planner.cpp @@ -39,30 +39,30 @@ typedef GlibFixture PlannerFixture; TEST_F(PlannerFixture, HelloWorld) { - auto halloween = g_date_time_new_local(2020, 10, 31, 18, 30, 59); - auto christmas = g_date_time_new_local(2020, 12, 25, 0, 0, 0); + auto halloween = DateTime::Local(2020, 10, 31, 18, 30, 59); + auto christmas = DateTime::Local(2020, 12, 25, 0, 0, 0); Appointment a; a.summary = "Test"; a.begin = halloween; - a.end = g_date_time_add_hours(halloween, 1); + a.end = a.begin.add_full(0,0,0,1,0,0); const Appointment b = a; a.summary = "Foo"; EXPECT_EQ(a.summary, "Foo"); EXPECT_EQ(b.summary, "Test"); - EXPECT_EQ(0, g_date_time_compare(a.begin(), b.begin())); - EXPECT_EQ(0, g_date_time_compare(a.end(), b.end())); + EXPECT_EQ(a.begin, b.begin); + EXPECT_EQ(a.end, b.end); Appointment c; c.begin = christmas; - c.end = g_date_time_add_hours(christmas, 1); + c.end = c.begin.add_days(1); Appointment d; d = c; - EXPECT_EQ(0, g_date_time_compare(c.begin(), d.begin())); - EXPECT_EQ(0, g_date_time_compare(c.end(), d.end())); + EXPECT_EQ(c.begin, d.begin); + EXPECT_EQ(c.end, d.end); a = d; - EXPECT_EQ(0, g_date_time_compare(d.begin(), a.begin())); - EXPECT_EQ(0, g_date_time_compare(d.end(), a.end())); + EXPECT_EQ(d.begin, a.begin); + EXPECT_EQ(d.end, a.end); } |