From 16b0ab32fe1b849523931ed33dbdd7ce0f9bac3f Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 9 Mar 2014 12:48:18 -0500 Subject: sync unit tests --- tests/test-planner.cpp | 6 +++--- tests/timezone-mock.h | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 tests/timezone-mock.h (limited to 'tests') diff --git a/tests/test-planner.cpp b/tests/test-planner.cpp index e5c11f9..6f602f4 100644 --- a/tests/test-planner.cpp +++ b/tests/test-planner.cpp @@ -18,13 +18,13 @@ */ #include "glib-fixture.h" +#include "timezone-mock.h" #include #include #include #include #include -#include #include #include @@ -44,8 +44,8 @@ TEST_F(PlannerFixture, EDS) g_date_time_unref(tmp); std::shared_ptr clock(new MockClock(now)); - std::shared_ptr timezones(new Timezones); - PlannerEds planner(clock, timezones); + std::shared_ptr tz(new MockTimezone); + PlannerEds planner(clock, tz); wait_msec(100); planner.time.set(now); diff --git a/tests/timezone-mock.h b/tests/timezone-mock.h new file mode 100644 index 0000000..67584cb --- /dev/null +++ b/tests/timezone-mock.h @@ -0,0 +1,40 @@ +/* + * Copyright 2014 Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + * + * Authors: + * Charles Kerr + */ + +#ifndef INDICATOR_DATETIME_TIMEZONE_MOCK_H +#define INDICATOR_DATETIME_TIMEZONE_MOCK_H + +#include + +namespace unity { +namespace indicator { +namespace datetime { + +class MockTimezone: public Timezone +{ +public: + MockTimezone() =default; + ~MockTimezone() =default; +}; + +} // namespace datetime +} // namespace indicator +} // namespace unity + +#endif // INDICATOR_DATETIME_TIMEZONE_MOCK_H -- cgit v1.2.3