summaryrefslogtreecommitdiff
path: root/common/mock/usb_prl_mock.c
diff options
context:
space:
mode:
authorAbe Levkoy <alevkoy@chromium.org>2020-12-07 17:39:09 -0700
committerCommit Bot <commit-bot@chromium.org>2020-12-15 15:39:18 +0000
commit0a561def48d4e673c834f4d01506ba8b9886cdd4 (patch)
treecbca0104ac3fe7058c0d58d14abd95decb39da6e /common/mock/usb_prl_mock.c
parent160208413d16840428e42ecae18457e862e6ed49 (diff)
downloadchrome-ec-0a561def48d4e673c834f4d01506ba8b9886cdd4.tar.gz
mock: Clean up TCPMv2 mocks
Place mock functions in the mock libraries corresponding to the layers of the real implementations. Broadly, move towards one layer of the TCPM stack as a UUT, with mocks for the other layers as needed. There should be a one-to-one correspondence between real modules and mock modules. usb_pd_mock.c does not correspond to any real implementation module or TCPM stack layer, so remove it and move its contents to the layers corresponding to their real implementations. Also clean up some redundant or misplaced mocks inside tests. BUG=b:153071799,b:173791979 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Ic44df8675de2b9f1f8c7669cd97dcdc296bf107f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2578200 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
Diffstat (limited to 'common/mock/usb_prl_mock.c')
-rw-r--r--common/mock/usb_prl_mock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/mock/usb_prl_mock.c b/common/mock/usb_prl_mock.c
index cb4b035ff4..5dba2b2805 100644
--- a/common/mock/usb_prl_mock.c
+++ b/common/mock/usb_prl_mock.c
@@ -126,6 +126,7 @@ int mock_prl_wait_for_tx_msg(int port,
}
task_wait_event(5 * MSEC);
}
+ /* A message of the expected type should have been sent by end_time. */
TEST_ASSERT(0);
return EC_ERROR_UNKNOWN;
}