summaryrefslogtreecommitdiff
path: root/test/usb_typec_drp_acc_trysrc.c
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2020-03-31 13:42:07 -0600
committerCommit Bot <commit-bot@chromium.org>2020-04-03 09:37:01 +0000
commit47f4e1bb56535e5e24785497ef48bae5cca10419 (patch)
tree6acebf09e97759f9e89b60e8745a5cd952fd881c /test/usb_typec_drp_acc_trysrc.c
parenteffcc803f8e406f1496af4f73654326b82914eee (diff)
downloadchrome-ec-47f4e1bb56535e5e24785497ef48bae5cca10419.tar.gz
Also update prints functionality to make tests easier to see what is happening BRANCH=none BUG=b:153071799 TEST=use mock in child CL Change-Id: Ia9cfeeff220e3255e6fc0aa41f0795df3b1920e4 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2131049 Commit-Queue: LaMont Jones <lamontjones@chromium.org>
Diffstat (limited to 'test/usb_typec_drp_acc_trysrc.c')
-rw-r--r--test/usb_typec_drp_acc_trysrc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/usb_typec_drp_acc_trysrc.c b/test/usb_typec_drp_acc_trysrc.c
index 479e103c38..3e8c271ddc 100644
--- a/test/usb_typec_drp_acc_trysrc.c
+++ b/test/usb_typec_drp_acc_trysrc.c
@@ -96,7 +96,7 @@ __maybe_unused static int test_mux_con_dis_as_snk(void)
__maybe_unused static int test_power_role_set(void)
{
/* Print out header changes for easier debugging */
- mock_tcpc.should_print_header_changes = true;
+ mock_tcpc.should_print_call = true;
/* Update CC lines send state machine event to process */
mock_tcpc.cc1 = TYPEC_CC_VOLT_OPEN;
@@ -105,8 +105,8 @@ __maybe_unused static int test_power_role_set(void)
task_wait_event(10 * SECOND);
/* We are in Attached.SRC now */
- TEST_EQ(mock_tcpc.power_role, PD_ROLE_SOURCE, "%d");
- TEST_EQ(mock_tcpc.data_role, PD_ROLE_DFP, "%d");
+ TEST_EQ(mock_tcpc.last.power_role, PD_ROLE_SOURCE, "%d");
+ TEST_EQ(mock_tcpc.last.data_role, PD_ROLE_DFP, "%d");
/*
* We allow 2 separate calls to update the header since power and data