test_ctf_writer.c: put statements outside BT_ASSERT()
[babeltrace.git] / tests / lib / test_ctf_writer.c
index de0b6123d5092e106c2cac5a65408428fa0c0679..95b7dbcc5bd2b10c66275cbe85ae943aecec3967 100644 (file)
@@ -301,7 +301,8 @@ void append_simple_event(struct bt_ctf_stream_class *stream_class,
        bt_ctf_event_class_add_field(simple_event_class, float_type,
                "float_field");
 
-       BT_ASSERT(!bt_ctf_event_class_set_id(simple_event_class, 13));
+       ret = bt_ctf_event_class_set_id(simple_event_class, 13);
+       BT_ASSERT(ret == 0);
 
        /* Set an event context type which will contain a single integer. */
        ok(!bt_ctf_field_type_structure_add_field(event_context_type, uint_12_type,
@@ -1536,6 +1537,7 @@ end:
 static
 void append_existing_event_class(struct bt_ctf_stream_class *stream_class)
 {
+       int ret;
        struct bt_ctf_event_class *event_class;
 
        event_class = bt_ctf_event_class_create("Simple Event");
@@ -1546,7 +1548,8 @@ void append_existing_event_class(struct bt_ctf_stream_class *stream_class)
 
        event_class = bt_ctf_event_class_create("different name, ok");
        BT_ASSERT(event_class);
-       BT_ASSERT(!bt_ctf_event_class_set_id(event_class, 13));
+       ret = bt_ctf_event_class_set_id(event_class, 13);
+       BT_ASSERT(ret == 0);
        ok(bt_ctf_stream_class_add_event_class(stream_class, event_class),
                "two event classes with the same ID cannot cohabit within the same stream class");
        bt_put(event_class);
This page took 0.023885 seconds and 4 git commands to generate.