tests: Bluetooth: MCC: Add invalid testing of bt_mcc_read_player_name

Add invalid testing of bt_mcc_read_player_name.

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

View file

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