+ ok(bt_ctf_event_class_get_stream_class(NULL) == NULL,
+ "bt_ctf_event_class_get_stream_class handles NULL correctly");
+ ret_stream_class = bt_ctf_event_class_get_stream_class(event_class);
+ ok(ret_stream_class == stream_class,
+ "bt_ctf_event_class_get_stream_class returns the correct stream class");
+ bt_ctf_stream_class_put(ret_stream_class);
+
+ ok(bt_ctf_event_class_get_field_count(NULL) < 0,
+ "bt_ctf_event_class_get_field_count handles NULL correctly");
+ ok(bt_ctf_event_class_get_field_count(event_class) == 3,
+ "bt_ctf_event_class_get_field_count returns a correct value");
+
+ ok(bt_ctf_event_class_get_field(NULL, &ret_string,
+ &ret_field_type, 0) < 0,
+ "bt_ctf_event_class_get_field handles a NULL event class correctly");
+ ok(bt_ctf_event_class_get_field(event_class, NULL,
+ &ret_field_type, 0) < 0,
+ "bt_ctf_event_class_get_field handles a NULL field name correctly");
+ ok(bt_ctf_event_class_get_field(event_class, &ret_string,
+ NULL, 0) < 0,
+ "bt_ctf_event_class_get_field handles a NULL field type correctly");
+ ok(bt_ctf_event_class_get_field(event_class, &ret_string,
+ &ret_field_type, 42) < 0,
+ "bt_ctf_event_class_get_field handles an invalid index correctly");
+ ok(bt_ctf_event_class_get_field(event_class, &ret_string,
+ &ret_field_type, 0) == 0,
+ "bt_ctf_event_class_get_field returns a field");
+ ok(ret_field_type == uint_35_type,
+ "bt_ctf_event_class_get_field returns a correct field type");
+ bt_ctf_field_type_put(ret_field_type);
+ ok(!strcmp(ret_string, "uint_35"),
+ "bt_ctf_event_class_get_field returns a correct field name");
+ ok(bt_ctf_event_class_get_field_by_name(NULL, "") == NULL,
+ "bt_ctf_event_class_get_field_by_name handles a NULL event class correctly");
+ ok(bt_ctf_event_class_get_field_by_name(event_class, NULL) == NULL,
+ "bt_ctf_event_class_get_field_by_name handles a NULL field name correctly");
+ ok(bt_ctf_event_class_get_field_by_name(event_class, "truie") == NULL,
+ "bt_ctf_event_class_get_field_by_name handles an invalid field name correctly");
+ ret_field_type = bt_ctf_event_class_get_field_by_name(event_class,
+ "complex_structure");
+ ok(ret_field_type == complex_structure_type,
+ "bt_ctf_event_class_get_field_by_name returns a correct field type");
+ bt_ctf_field_type_put(ret_field_type);
+