X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=tests%2Flib%2Ftest_ctf_writer.c;fp=tests%2Flib%2Ftest_ctf_writer.c;h=95b7dbcc5bd2b10c66275cbe85ae943aecec3967;hp=de0b6123d5092e106c2cac5a65408428fa0c0679;hb=baa56d0a4425a4865c638faaed4728ece07d59c7;hpb=5ea30b28acfde37adf65e73964b81896e2cc75fd diff --git a/tests/lib/test_ctf_writer.c b/tests/lib/test_ctf_writer.c index de0b6123..95b7dbcc 100644 --- a/tests/lib/test_ctf_writer.c +++ b/tests/lib/test_ctf_writer.c @@ -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);