summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/usb_typec_drp_acc_trysrc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/usb_typec_drp_acc_trysrc.c b/test/usb_typec_drp_acc_trysrc.c
index 375ea9364f..34e356e884 100644
--- a/test/usb_typec_drp_acc_trysrc.c
+++ b/test/usb_typec_drp_acc_trysrc.c
@@ -162,6 +162,14 @@ __maybe_unused static int test_polarity_cc1_default(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_RP_DEF;
mock_tcpc.cc2 = TYPEC_CC_VOLT_OPEN;
mock_tcpc.vbus_level = 1;
+
+ /*
+ * In this test we are expecting value of polarity, which is set by
+ * default for tcpc mock. Initialize it with something else, in order
+ * to catch possible errors.
+ */
+ mock_tcpc.last.polarity = POLARITY_COUNT;
+
task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
/* Before tCCDebounce elapses, we should SRC */