diff options
author | Yuval Peress <peress@google.com> | 2022-03-09 12:45:29 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-03-11 04:49:45 +0000 |
commit | ed96eeb933e8ef5c0a940af20478b9691b758a4e (patch) | |
tree | c032bfb3f4ae0a20c2d395b36e41c87b0a69dd4e /zephyr/test | |
parent | f8039ac8f13e9a757a151d4c9106843fbc274f65 (diff) | |
download | chrome-ec-ed96eeb933e8ef5c0a940af20478b9691b758a4e.tar.gz |
zephyr: test default implementation of charge_port_is_sink
Add a test for the default implementation which always return 1.
BRANCH=none
BUG=b:222630005
TEST=zmake test test-drivers
Signed-off-by: Yuval Peress <peress@google.com>
Change-Id: I8edc629353b8e62f40687234682e0de22dc9fa29
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3513660
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'zephyr/test')
-rw-r--r-- | zephyr/test/drivers/src/charge_manager.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/zephyr/test/drivers/src/charge_manager.c b/zephyr/test/drivers/src/charge_manager.c index f4d8f4d74a..0accf7a448 100644 --- a/zephyr/test/drivers/src/charge_manager.c +++ b/zephyr/test/drivers/src/charge_manager.c @@ -48,3 +48,11 @@ ZTEST_USER(charge_manager, test_default_charge_port_is_connected) zassert_true(board_charge_port_is_connected(1), NULL); zassert_true(board_charge_port_is_connected(500), NULL); } + +ZTEST_USER(charge_manager, test_default_charge_port_is_sink) +{ + zassert_true(board_charge_port_is_sink(-1), NULL); + zassert_true(board_charge_port_is_sink(0), NULL); + zassert_true(board_charge_port_is_sink(1), NULL); + zassert_true(board_charge_port_is_sink(500), NULL); +} |