tests: Bluetooth: MCC: Add invalid testing of bt_mcc_discover_mcs

Add invalid testing of bt_mcc_discover_mcs.

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

View file

@ -1459,6 +1459,14 @@ static void test_discover(void)
{ {
int err; int err;
/* Invalid behavior */
err = bt_mcc_discover_mcs(NULL, true);
if (err == 0) {
FAIL("bt_mcc_discover_mcs did not fail with NULL conn");
return;
}
/* Valid behavior */
UNSET_FLAG(discovery_done); UNSET_FLAG(discovery_done);
err = bt_mcc_discover_mcs(default_conn, true); err = bt_mcc_discover_mcs(default_conn, true);