summaryrefslogtreecommitdiff
path: root/board/host/battery.c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2014-04-08 17:42:37 -0700
committerBill Richardson <wfrichar@chromium.org>2014-04-11 15:37:53 +0000
commit9814e54204185398ff62bdf7a1a18ceb972021bc (patch)
treef27fc811ad15cde47ae521acd3275004bc133808 /board/host/battery.c
parent5019551e1d63bdd95e8b358a409e923c16e604fd (diff)
downloadchrome-ec-9814e54204185398ff62bdf7a1a18ceb972021bc.tar.gz
Increase test coverage of charge_state_v2.c
This improves some of the smart battery mocks, and adds some more tests for the new change state machine. BUG=chrome-os-partner:20881 BRANCH=ToT TEST=make coverage Line coverage of this file jumps from 53% to 93%. Change-Id: I4a9b8818cefaffd3022cebe08a36d592b0611295 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/193690
Diffstat (limited to 'board/host/battery.c')
-rw-r--r--board/host/battery.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/board/host/battery.c b/board/host/battery.c
index 85173f8378..a5c447f5d7 100644
--- a/board/host/battery.c
+++ b/board/host/battery.c
@@ -45,6 +45,7 @@ int sb_i2c_read_string(int port, int slave_addr, int offset, uint8_t *data,
{
return EC_SUCCESS;
}
+DECLARE_TEST_I2C_READ_STRING(sb_i2c_read_string);
int battery_time_at_rate(int rate, int *minutes)
{