+ BT_ASSERT_POST_DEV(NEXT_METHOD_NAME,
+ "stream-class-has-clock-class", clock_class,
+ "Expecting a clock class, got none.");
+
+ BT_ASSERT_POST_DEV(NEXT_METHOD_NAME,
+ "clock-class-is-expected",
+ clock_class == iterator->clock_expectation.clock_class,
+ "Expecting clock class %![cc-]+K, got %![cc-]+K.",
+ iterator->clock_expectation.clock_class,
+ clock_class);
+ break;
+ }
+ }
+}
+
+static
+void assert_post_dev_clock_classes_are_compatible(
+ struct bt_message_iterator *iterator,
+ bt_message_array_const msgs, uint64_t msg_count)
+{
+ uint64_t i;
+
+ for (i = 0; i < msg_count; i++) {
+ assert_post_dev_clock_classes_are_compatible_one(iterator, msgs[i]);
+ }
+}
+
+static
+const bt_stream *get_stream_from_msg(const struct bt_message *msg)
+{
+ struct bt_stream *stream;
+
+ switch (msg->type) {
+ case BT_MESSAGE_TYPE_STREAM_BEGINNING:
+ case BT_MESSAGE_TYPE_STREAM_END:
+ {
+ struct bt_message_stream *msg_stream =
+ (struct bt_message_stream *) msg;
+ stream = msg_stream->stream;
+ break;
+ }
+ case BT_MESSAGE_TYPE_EVENT:
+ {
+ struct bt_message_event *msg_event =
+ (struct bt_message_event *) msg;
+ stream = msg_event->event->stream;
+ break;
+ }
+ case BT_MESSAGE_TYPE_PACKET_BEGINNING:
+ case BT_MESSAGE_TYPE_PACKET_END:
+ {
+ struct bt_message_packet *msg_packet =
+ (struct bt_message_packet *) msg;
+ stream = msg_packet->packet->stream;
+ break;
+ }
+ case BT_MESSAGE_TYPE_DISCARDED_EVENTS:
+ case BT_MESSAGE_TYPE_DISCARDED_PACKETS:
+ {
+ struct bt_message_discarded_items *msg_discarded =
+ (struct bt_message_discarded_items *) msg;
+ stream = msg_discarded->stream;
+ break;
+ }
+ case BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY:
+ stream = NULL;
+ break;
+ default:
+ bt_common_abort();
+ }
+
+ return stream;
+}
+
+static
+GString *message_types_to_string(guint msg_types)
+{
+ GString *str = g_string_new("");
+
+ for (int msg_type = 1; msg_type <= BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY;
+ msg_type <<= 1) {
+ if (msg_type & msg_types) {
+ if (str->len > 0) {
+ g_string_append_c(str, '|');