tests: Bluetooth: MCC: Add invalid testing of test_read_icon_obj_id

Add invalid testing of test_read_icon_obj_id.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2023-02-10 15:07:17 +01:00 committed by Carles Cufí
commit f30b46fc7b

View file

@ -1506,6 +1506,14 @@ static void test_read_icon_obj_id(void)
{
int err;
/* Invalid behavior */
err = bt_mcc_read_icon_obj_id(NULL);
if (err == 0) {
FAIL("bt_mcc_read_icon_obj_id did not fail with NULL conn");
return;
}
/* Valid behavior */
UNSET_FLAG(icon_object_id_read);
err = bt_mcc_read_icon_obj_id(default_conn);