summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2021-08-06 09:15:58 -0700
committerCommit Bot <commit-bot@chromium.org>2021-08-09 17:34:59 +0000
commit8a9102efc3506b14b0ce275d0e2a05653587cfc5 (patch)
treea63c756193919153c4fab0e50e3f191090c65066 /common
parentb82517a459d8e9394a1ea4a2a0148232c61f45e5 (diff)
downloadchrome-ec-8a9102efc3506b14b0ce275d0e2a05653587cfc5.tar.gz
chgstv2/sustainer: Add tests for full battery and AC
Currently, unit tests do not check whether the battery sustainer can be enabled when the battery is already full or when the AC is already present. This patch adds tests which check the battery sustainer can be enabled when the battery is already full or when the AC is already present. BUG=b:188457962 BRANCH=None TEST=run-sbs_charging_v2 Change-Id: I4ec9785554d126baca0b60e889c4a2dabbfb628a Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3078401 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/charge_state_v2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/charge_state_v2.c b/common/charge_state_v2.c
index e5f62fff60..f293c61175 100644
--- a/common/charge_state_v2.c
+++ b/common/charge_state_v2.c
@@ -1280,7 +1280,7 @@ static void show_charging_progress(void)
}
/* Calculate if battery is full based on whether it is accepting charge */
-static int calc_is_full(void)
+test_mockable int calc_is_full(void)
{
static int __bss_slow ret;