aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-01-22 10:15:56 -0600
committerCharles Kerr <charles.kerr@canonical.com>2014-01-22 10:15:56 -0600
commit08b1cfd6bc97cae18b916d97a03781986e7421fe (patch)
treec776258f7a9a8a589fa07774ed753bfdfe9736eb
parent063ff0ef0a7761e713b7b36e220e0e2bfa442326 (diff)
downloadayatana-indicator-datetime-08b1cfd6bc97cae18b916d97a03781986e7421fe.tar.gz
ayatana-indicator-datetime-08b1cfd6bc97cae18b916d97a03781986e7421fe.tar.bz2
ayatana-indicator-datetime-08b1cfd6bc97cae18b916d97a03781986e7421fe.zip
move planner-mock.h from include/datetime/ to tests/ because it's only needed by the tests.
-rw-r--r--include/datetime/planner-mock.h44
-rw-r--r--tests/planner-mock.h52
-rw-r--r--tests/state-mock.h3
3 files changed, 21 insertions, 78 deletions
diff --git a/include/datetime/planner-mock.h b/include/datetime/planner-mock.h
deleted file mode 100644
index 44d30c7..0000000
--- a/include/datetime/planner-mock.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2013 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 <http://www.gnu.org/licenses/>.
- *
- * Authors:
- * Charles Kerr <charles.kerr@canonical.com>
- */
-
-#ifndef INDICATOR_DATETIME_PLANNER_MOCK_H
-#define INDICATOR_DATETIME_PLANNER_MOCK_H
-
-#include <datetime/planner.h>
-
-namespace unity {
-namespace indicator {
-namespace datetime {
-
-/**
- * \brief Planner which does nothing on its own.
- * It requires its client must set its appointments property.
- */
-class MockPlanner: public Planner
-{
-public:
- MockPlanner() =default;
- virtual ~MockPlanner() =default;
-};
-
-} // namespace datetime
-} // namespace indicator
-} // namespace unity
-
-#endif // INDICATOR_DATETIME_PLANNER_MOCK_H
diff --git a/tests/planner-mock.h b/tests/planner-mock.h
index 8d7d7c2..44d30c7 100644
--- a/tests/planner-mock.h
+++ b/tests/planner-mock.h
@@ -1,9 +1,6 @@
/*
* Copyright 2013 Canonical Ltd.
*
- * Authors:
- * Charles Kerr <charles.kerr@canonical.com>
- *
* 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.
@@ -15,44 +12,33 @@
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ * Charles Kerr <charles.kerr@canonical.com>
*/
-#ifndef __INDICATOR_DATETIME_PLANNER_MOCK__H__
-#define __INDICATOR_DATETIME_PLANNER_MOCK__H__
-
-#include "planner.h" /* parent class */
+#ifndef INDICATOR_DATETIME_PLANNER_MOCK_H
+#define INDICATOR_DATETIME_PLANNER_MOCK_H
-G_BEGIN_DECLS
+#include <datetime/planner.h>
-#define INDICATOR_TYPE_DATETIME_PLANNER_MOCK (indicator_datetime_planner_mock_get_type())
-#define INDICATOR_DATETIME_PLANNER_MOCK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), INDICATOR_TYPE_DATETIME_PLANNER_MOCK, IndicatorDatetimePlannerMock))
-#define INDICATOR_DATETIME_PLANNER_MOCK_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), INDICATOR_TYPE_DATETIME_PLANNER_MOCK, IndicatorDatetimePlannerMockClass))
-#define INDICATOR_IS_DATETIME_PLANNER_MOCK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), INDICATOR_TYPE_DATETIME_PLANNER_MOCK))
-
-typedef struct _IndicatorDatetimePlannerMock IndicatorDatetimePlannerMock;
-typedef struct _IndicatorDatetimePlannerMockPriv IndicatorDatetimePlannerMockPriv;
-typedef struct _IndicatorDatetimePlannerMockClass IndicatorDatetimePlannerMockClass;
-
-GType indicator_datetime_planner_mock_get_type (void);
+namespace unity {
+namespace indicator {
+namespace datetime {
/**
- * An IndicatorDatetimePlanner which uses Evolution Data Server
- * to get its list of appointments.
+ * \brief Planner which does nothing on its own.
+ * It requires its client must set its appointments property.
*/
-struct _IndicatorDatetimePlannerMock
-{
- /*< private >*/
- IndicatorDatetimePlanner parent;
- IndicatorDatetimePlannerMockPriv * priv;
-};
-
-struct _IndicatorDatetimePlannerMockClass
+class MockPlanner: public Planner
{
- IndicatorDatetimePlannerClass parent_class;
+public:
+ MockPlanner() =default;
+ virtual ~MockPlanner() =default;
};
-IndicatorDatetimePlanner * indicator_datetime_planner_mock_new (void);
-
-G_END_DECLS
+} // namespace datetime
+} // namespace indicator
+} // namespace unity
-#endif /* __INDICATOR_DATETIME_PLANNER_MOCK__H__ */
+#endif // INDICATOR_DATETIME_PLANNER_MOCK_H
diff --git a/tests/state-mock.h b/tests/state-mock.h
index f2e58e6..64ab08b 100644
--- a/tests/state-mock.h
+++ b/tests/state-mock.h
@@ -17,8 +17,9 @@
* Charles Kerr <charles.kerr@canonical.com>
*/
+#include "planner-mock.h"
+
#include <datetime/clock-mock.h>
-#include <datetime/planner-mock.h>
#include <datetime/state.h>
using namespace unity::indicator::datetime;