From c2c02249a01ec56857a51e1645060325f7558b59 Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Tue, 15 Sep 2015 12:15:49 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/299768 Reviewed-by: Alec Berg --- include/link_defs.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'include/link_defs.h') 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[]; -- cgit v1.2.1