Make bt_graph_add_*_listener() function return a listener ID
[babeltrace.git] / tests / plugins / test-utils-muxer.c
index 2fd584c921dd3a32dfbb3e4d4def9074d7fdcd74..5871e6614dc232d8ca237b98b2de25d534deaf79 100644 (file)
@@ -18,6 +18,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
+#include <stdbool.h>
 #include <inttypes.h>
 #include <string.h>
 #include <assert.h>
@@ -461,7 +462,7 @@ enum bt_notification_iterator_status src_iter_init(
                user_data->packet = src_packet3;
                break;
        default:
-               assert(false);
+               abort();
        }
 
        switch (current_test) {
@@ -503,7 +504,7 @@ enum bt_notification_iterator_status src_iter_init(
                }
                break;
        default:
-               assert(false);
+               abort();
        }
 
        return BT_NOTIFICATION_ITERATOR_STATUS_OK;
@@ -527,6 +528,7 @@ struct bt_ctf_event *src_create_event(struct bt_ctf_packet *packet,
                        (uint64_t) ts_ns);
                assert(clock_value);
                ret = bt_ctf_event_set_clock_value(event, clock_value);
+               assert(ret == 0);
                bt_put(clock_value);
        }
 
@@ -589,10 +591,7 @@ static
 struct bt_notification_iterator_next_return src_iter_next(
                struct bt_private_notification_iterator *priv_iterator)
 {
-       struct bt_notification_iterator_next_return next_return = {
-               .status = BT_NOTIFICATION_ITERATOR_STATUS_OK,
-               .notification = NULL,
-       };
+       struct bt_notification_iterator_next_return next_return;
        struct src_iter_user_data *user_data =
                bt_private_notification_iterator_get_user_data(priv_iterator);
        struct bt_private_component *private_component =
@@ -673,7 +672,7 @@ struct bt_notification_iterator_next_return src_iter_next(
                }
                break;
        default:
-               assert(false);
+               abort();
        }
 
        bt_put(private_component);
@@ -1478,7 +1477,7 @@ void test_single_end_then_multiple_full(void)
        ret = bt_graph_add_port_added_listener(graph,
                graph_port_added_listener_connect_to_avail_muxer_port,
                &graph_listener_data);
-       assert(ret == 0);
+       assert(ret >= 0);
 
        /* Connect source output ports to muxer input ports */
        count = bt_component_source_get_output_port_count(src_comp);
@@ -1607,7 +1606,7 @@ void test_single_again_end_then_multiple_full(void)
        ret = bt_graph_add_port_added_listener(graph,
                graph_port_added_listener_connect_to_avail_muxer_port,
                &graph_listener_data);
-       assert(ret == 0);
+       assert(ret >= 0);
 
        /* Connect source output ports to muxer input ports */
        count = bt_component_source_get_output_port_count(src_comp);
This page took 0.024286 seconds and 4 git commands to generate.