- BT_ASSERT_PRE_NON_NULL(component, "Component");
- BT_ASSERT_PRE_NON_NULL(name, "Name");
- BT_ASSERT_PRE(strlen(name) > 0, "Name is empty");
+ BT_ASSERT_PRE_NO_ERROR_FROM_FUNC(api_func);
+ BT_ASSERT_PRE_COMP_NON_NULL_FROM_FUNC(api_func, component);
+ BT_ASSERT_PRE_NAME_NON_NULL_FROM_FUNC(api_func, name);
+ BT_ASSERT_PRE_FROM_FUNC(api_func,
+ input ? "input" : "output" "-port-name-is-unique",
+ port_name_is_unique(component->output_ports, name),
+ input ? "Input" : "Output"
+ " port name is not unique: name=\"%s\", %![comp-]c",
+ name, component);
+ BT_ASSERT_PRE_FROM_FUNC(api_func, "name-is-not-empty",
+ strlen(name) > 0, "Name is empty");