tests: Bluetooth: MCC: Add invalid testing of bt_mcc_read_opcodes_supported

Add invalid testing of bt_mcc_read_opcodes_supported.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2023-02-10 13:31:44 +01:00 committed by Carles Cufí
commit 9dea871a7a

View file

@ -673,6 +673,14 @@ static void test_read_supported_opcodes(void)
{
int err;
/* Invalid behavior */
err = bt_mcc_read_opcodes_supported(NULL);
if (err == 0) {
FAIL("bt_mcc_read_opcodes_supported did not fail with NULL conn");
return;
}
/* Valid behavior */
UNSET_FLAG(supported_opcodes_read);
err = bt_mcc_read_opcodes_supported(default_conn);
if (err != 0) {