diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2015-09-15 12:15:49 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-16 14:49:46 -0700 |
commit | c2c02249a01ec56857a51e1645060325f7558b59 (patch) | |
tree | 0c62ecf9d06d85faf881396d28c196ba187e23a8 /include/link_defs.h | |
parent | fe77303bec6c78786a9df1dbdb33af64787e20c8 (diff) | |
download | chrome-ec-c2c02249a01ec56857a51e1645060325f7558b59.tar.gz |
host: mock i2c_xfer
Instead of mocking i2c_read8/16/32, mock i2c_xfer.
We can now test code that call i2c_xfer directly and
test common/i2c.c
BRANCH=samus, ryu
BUG=chrome-os-partner:45223
TEST=Unit tests pass.
Change-Id: Iaa772515c40cf55d2050d0019e2062d63278adc0
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/299768
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'include/link_defs.h')
-rw-r--r-- | include/link_defs.h | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/include/link_defs.h b/include/link_defs.h index 8c775affa2..ad6a39f837 100644 --- a/include/link_defs.h +++ b/include/link_defs.h @@ -58,20 +58,8 @@ extern const struct deferred_data __deferred_funcs[]; extern const struct deferred_data __deferred_funcs_end[]; /* I2C fake devices for unit testing */ -extern const struct test_i2c_read_dev __test_i2c_read8[]; -extern const struct test_i2c_read_dev __test_i2c_read8_end[]; -extern const struct test_i2c_write_dev __test_i2c_write8[]; -extern const struct test_i2c_write_dev __test_i2c_write8_end[]; -extern const struct test_i2c_read_dev __test_i2c_read16[]; -extern const struct test_i2c_read_dev __test_i2c_read16_end[]; -extern const struct test_i2c_read_dev __test_i2c_read32[]; -extern const struct test_i2c_read_dev __test_i2c_read32_end[]; -extern const struct test_i2c_write_dev __test_i2c_write16[]; -extern const struct test_i2c_write_dev __test_i2c_write16_end[]; -extern const struct test_i2c_write_dev __test_i2c_write32[]; -extern const struct test_i2c_write_dev __test_i2c_write32_end[]; -extern const struct test_i2c_read_string_dev __test_i2c_read_string[]; -extern const struct test_i2c_read_string_dev __test_i2c_read_string_end[]; +extern const struct test_i2c_xfer __test_i2c_xfer[]; +extern const struct test_i2c_xfer __test_i2c_xfer_end[]; /* Host commands */ extern const struct host_command __hcmds[]; |