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.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/print-to.h b/tests/print-to.h
index f4af2f7..357925f 100644
--- a/tests/print-to.h
+++ b/tests/print-to.h
@@ -47,6 +47,30 @@ PrintTo(const Alarm& alarm, std::ostream* os)
*os << '}';
}
+void
+PrintTo(const Appointment& appointment, std::ostream* os)
+{
+ *os << '{';
+
+ *os << "{uid:'" << appointment.uid << "'}"
+ << "{color:'" << appointment.color << "'}"
+ << "{summary:'" << appointment.summary << "'}"
+ << "{activation_url:'" << appointment.activation_url << "'}";
+
+ *os << "{begin:";
+ PrintTo(appointment.begin, os);
+ *os << '}';
+
+ *os << "{end:";
+ PrintTo(appointment.end, os);
+ *os << '}';
+
+ for(const auto& alarm : appointment.alarms)
+ PrintTo(alarm, os);
+
+ *os << '}';
+}
+
} // namespace datetime
} // namespace indicator
} // namespace unity