Lines Matching refs:fixture

34 	struct bc12_pi3usb9201_charging_mode_fixture *fixture = user_data;  in bc12_test_result_cb()  local
44 fixture->partner_state = *state; in bc12_test_result_cb()
47 fixture->partner_state.type = BC12_TYPE_NONE; in bc12_test_result_cb()
48 fixture->partner_state.current_ua = 0; in bc12_test_result_cb()
49 fixture->partner_state.voltage_uv = 0; in bc12_test_result_cb()
55 bc12_set_role(fixture->bc12_dev, BC12_CHARGING_PORT); in ZTEST_USER_F()
57 bc12_emul_set_pd_partner(fixture->bc12_emul, true); in ZTEST_USER_F()
61 zassert_true(fixture->partner_state.pd_partner_connected); in ZTEST_USER_F()
63 bc12_emul_set_pd_partner(fixture->bc12_emul, false); in ZTEST_USER_F()
67 zassert_false(fixture->partner_state.pd_partner_connected); in ZTEST_USER_F()
72 struct bc12_pi3usb9201_charging_mode_fixture *fixture = data; in bc12_before() local
74 memset(&fixture->partner_state, 0, sizeof(struct bc12_partner_state)); in bc12_before()
76 bc12_set_result_cb(fixture->bc12_dev, &bc12_test_result_cb, fixture); in bc12_before()
81 struct bc12_pi3usb9201_charging_mode_fixture *fixture = data; in bc12_after() local
83 bc12_set_result_cb(fixture->bc12_dev, NULL, NULL); in bc12_after()
84 bc12_set_role(fixture->bc12_dev, BC12_DISCONNECTED); in bc12_after()
89 static struct bc12_pi3usb9201_charging_mode_fixture fixture = { in bc12_setup() local
94 zassert_not_null(fixture.bc12_dev); in bc12_setup()
95 zassert_not_null(fixture.bc12_emul); in bc12_setup()
96 zassert_true(device_is_ready(fixture.bc12_dev)); in bc12_setup()
98 return &fixture; in bc12_setup()