ir: support optional parameters in bt_ctf_field_type_variant_get_field
[babeltrace.git] / tests / lib / test_ctf_writer.c
index 47096354821fb410730ed8d2c0dfac00d455c41c..368c1e9fc20a12a9584f6ea5b4814380ffd8f549 100644 (file)
@@ -883,9 +883,10 @@ void append_complex_event(struct bt_ctf_stream_class *stream_class,
 
        ok(bt_ctf_field_type_variant_get_field(NULL, &ret_string, &ret_field_type, 0) < 0,
                "bt_ctf_field_type_variant_get_field handles a NULL type correctly");
-       ok(bt_ctf_field_type_variant_get_field(variant_type, NULL, &ret_field_type, 0) < 0,
+       ok(bt_ctf_field_type_variant_get_field(variant_type, NULL, &ret_field_type, 0) == 0,
                "bt_ctf_field_type_variant_get_field handles a NULL field name correctly");
-       ok(bt_ctf_field_type_variant_get_field(variant_type, &ret_string, NULL, 0) < 0,
+       bt_ctf_field_type_put(ret_field_type);
+       ok(bt_ctf_field_type_variant_get_field(variant_type, &ret_string, NULL, 0) == 0,
                "bt_ctf_field_type_variant_get_field handles a NULL field type correctly");
        ok(bt_ctf_field_type_variant_get_field(variant_type, &ret_string, &ret_field_type, 200) < 0,
                "bt_ctf_field_type_variant_get_field handles an invalid index correctly");
This page took 0.025913 seconds and 4 git commands to generate.