Lines Matching refs:fixture

43 static void mock_init_rule_before(const struct ztest_unit_test *test, void *fixture)  in mock_init_rule_before()  argument
48 static void mock_destroy_rule_after(const struct ztest_unit_test *test, void *fixture) in mock_destroy_rule_after() argument
65 static void ascs_test_suite_fixture_init(struct ascs_test_suite_fixture *fixture) in ascs_test_suite_fixture_init() argument
73 memset(fixture, 0, sizeof(*fixture)); in ascs_test_suite_fixture_init()
78 fixture->ase_cp = test_ase_control_point_get(); in ascs_test_suite_fixture_init()
80 test_conn_init(&fixture->conn); in ascs_test_suite_fixture_init()
82 test_ase_snk_get(CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT, &fixture->ase_snk.attr); in ascs_test_suite_fixture_init()
83 if (fixture->ase_snk.attr != NULL) { in ascs_test_suite_fixture_init()
84 fixture->ase_snk.id = test_ase_id_get(fixture->ase_snk.attr); in ascs_test_suite_fixture_init()
87 test_ase_src_get(CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT, &fixture->ase_src.attr); in ascs_test_suite_fixture_init()
88 if (fixture->ase_src.attr != NULL) { in ascs_test_suite_fixture_init()
89 fixture->ase_src.id = test_ase_id_get(fixture->ase_src.attr); in ascs_test_suite_fixture_init()
95 struct ascs_test_suite_fixture *fixture; in ascs_test_suite_setup() local
97 fixture = malloc(sizeof(*fixture)); in ascs_test_suite_setup()
98 zassert_not_null(fixture); in ascs_test_suite_setup()
100 return fixture; in ascs_test_suite_setup()
136 zassert_not_null(fixture->ase_snk.attr); in ZTEST_F()
143 zassert_not_null(fixture->ase_src.attr); in ZTEST_F()
148 zassert_not_null(fixture->ase_cp); in ZTEST_F()
153 const struct bt_gatt_attr *ase = fixture->ase_snk.attr; in ZTEST_F()
154 struct bt_conn *conn = &fixture->conn; in ZTEST_F()
159 zexpect_not_null(fixture->ase_snk.attr); in ZTEST_F()
170 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F()
171 struct bt_conn *conn = &fixture->conn; in ZTEST_F()
177 ase = fixture->ase_snk.attr; in ZTEST_F()
178 ase_id = fixture->ase_snk.id; in ZTEST_F()
180 ase = fixture->ase_src.attr; in ZTEST_F()
181 ase_id = fixture->ase_src.id; in ZTEST_F()
215 const struct bt_gatt_attr *ase_cp = fixture->ase_cp; in ZTEST_F()
216 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F()
217 struct bt_conn *conn = &fixture->conn; in ZTEST_F()
222 ase_id = fixture->ase_snk.id; in ZTEST_F()
224 ase_id = fixture->ase_src.id; in ZTEST_F()
252 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F()
253 struct bt_conn *conn = &fixture->conn; in ZTEST_F()
260 ase = fixture->ase_snk.attr; in ZTEST_F()
261 ase_id = fixture->ase_snk.id; in ZTEST_F()
263 ase = fixture->ase_src.attr; in ZTEST_F()
264 ase_id = fixture->ase_src.id; in ZTEST_F()
291 struct bt_conn *conn = &fixture->conn; in ZTEST_F()
302 ase_snk = fixture->ase_snk.attr; in ZTEST_F()
304 ase_snk_id = fixture->ase_snk.id; in ZTEST_F()
309 ase_src = fixture->ase_src.attr; in ZTEST_F()
311 ase_src_id = fixture->ase_src.id; in ZTEST_F()
349 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F()
350 struct bt_conn *conn = &fixture->conn; in ZTEST_F()
351 uint8_t ase_id = fixture->ase_snk.id; in ZTEST_F()
375 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F()
376 struct bt_conn *conn = &fixture->conn; in ZTEST_F()
377 uint8_t ase_id = fixture->ase_snk.id; in ZTEST_F()
406 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F()
407 struct bt_conn *conn = &fixture->conn; in ZTEST_F()
414 ase = fixture->ase_snk.attr; in ZTEST_F()
415 ase_id = fixture->ase_snk.id; in ZTEST_F()
417 ase = fixture->ase_src.attr; in ZTEST_F()
418 ase_id = fixture->ase_src.id; in ZTEST_F()
439 static void test_cis_link_loss_in_disabling_state(struct ascs_test_suite_fixture *fixture, in test_cis_link_loss_in_disabling_state() argument
442 struct bt_bap_stream *stream = &fixture->stream; in test_cis_link_loss_in_disabling_state()
443 struct bt_conn *conn = &fixture->conn; in test_cis_link_loss_in_disabling_state()
451 ase = fixture->ase_src.attr; in test_cis_link_loss_in_disabling_state()
452 ase_id = fixture->ase_src.id; in test_cis_link_loss_in_disabling_state()
486 test_cis_link_loss_in_disabling_state(fixture, true); in ZTEST_F()
492 test_cis_link_loss_in_disabling_state(fixture, false); in ZTEST_F()
497 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F()
498 struct bt_conn *conn = &fixture->conn; in ZTEST_F()
505 ase = fixture->ase_snk.attr; in ZTEST_F()
506 ase_id = fixture->ase_snk.id; in ZTEST_F()
508 ase = fixture->ase_src.attr; in ZTEST_F()
509 ase_id = fixture->ase_src.id; in ZTEST_F()
543 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F()
544 struct bt_conn *conn = &fixture->conn; in ZTEST_F()
551 ase = fixture->ase_snk.attr; in ZTEST_F()
552 ase_id = fixture->ase_snk.id; in ZTEST_F()
554 ase = fixture->ase_src.attr; in ZTEST_F()
555 ase_id = fixture->ase_src.id; in ZTEST_F()
612 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F()
613 struct bt_conn *conn = &fixture->conn; in ZTEST_F()
620 ase = fixture->ase_snk.attr; in ZTEST_F()
621 ase_id = fixture->ase_snk.id; in ZTEST_F()
623 ase = fixture->ase_src.attr; in ZTEST_F()
624 ase_id = fixture->ase_src.id; in ZTEST_F()