aboutsummaryrefslogtreecommitdiff
path: root/tests/print-to.h
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-04-06 23:35:42 +0000
committerCI Train Bot <ci-train-bot@canonical.com>2015-04-06 23:35:42 +0000
commit227aa820086c19279743d502fd5e78cf17144b24 (patch)
tree9465713567b8af9f8f9762450bb43ae5a39a7fb8 /tests/print-to.h
parent9f48c6479a17771597544adc36eac968b9b5c027 (diff)
parent10c574cc26a4a55d63eed7f3b846efb4d766dd6b (diff)
downloadayatana-indicator-datetime-227aa820086c19279743d502fd5e78cf17144b24.tar.gz
ayatana-indicator-datetime-227aa820086c19279743d502fd5e78cf17144b24.tar.bz2
ayatana-indicator-datetime-227aa820086c19279743d502fd5e78cf17144b24.zip
Improve valarm support to honor calendar events' valarm triggers. Fixes: #1419001
Approved by: Ted Gould, PS Jenkins bot
Diffstat (limited to 'tests/print-to.h')
-rw-r--r--tests/print-to.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/print-to.h b/tests/print-to.h
new file mode 100644
index 0000000..78cf574
--- /dev/null
+++ b/tests/print-to.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2015 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_TESTS_PRINT_TO
+#define INDICATOR_DATETIME_TESTS_PRINT_TO
+
+#include <algorithm>
+
+#include <datetime/appointment.h>
+
+namespace unity {
+namespace indicator {
+namespace datetime {
+
+/***
+**** PrintTo() functions for GTest to represent objects as strings
+***/
+
+void
+PrintTo(const Alarm& alarm, std::ostream* os)
+{
+ *os << "{text:'" << alarm.text << "', audio_url:'" << alarm.audio_url << "', time:'"<<alarm.time.format("%F %T")<<"'}";
+}
+
+} // namespace datetime
+} // namespace indicator
+} // namespace unity
+
+#endif