aboutsummaryrefslogtreecommitdiff
path: root/tests/print-to.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/print-to.h')
-rw-r--r--tests/print-to.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/print-to.h b/tests/print-to.h
index 78cf574..f4af2f7 100644
--- a/tests/print-to.h
+++ b/tests/print-to.h
@@ -33,9 +33,18 @@ namespace datetime {
***/
void
+PrintTo(const DateTime& datetime, std::ostream* os)
+{
+ *os << "{time:'" << datetime.format("%F %T %z") << '}';
+}
+
+void
PrintTo(const Alarm& alarm, std::ostream* os)
{
- *os << "{text:'" << alarm.text << "', audio_url:'" << alarm.audio_url << "', time:'"<<alarm.time.format("%F %T")<<"'}";
+ *os << '{';
+ *os << "{text:" << alarm.text << '}';
+ PrintTo(alarm.time, os);
+ *os << '}';
}
} // namespace datetime