Skip to content

Commit b55a706

Browse files
I2C test alignment fix on wrong field (#89)
1 parent 21a50bb commit b55a706

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

protocol/i2c_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ TEST_F(LibHothTest, i2c_transfer_test) {
8989
struct ec_response_i2c_transfer resp;
9090
EXPECT_EQ(libhoth_i2c_transfer(&hoth_dev_, &xfer, &resp), LIBHOTH_OK);
9191

92+
EXPECT_EQ(resp.bus_response, ex_resp.bus_response);
9293
// EXPECT_EQ does funny things with its arguments and may cause them to
9394
// lose their attributes. This can cause test failures due to unaligned
9495
// access, so we explicitly add casts here.
95-
EXPECT_EQ(static_cast<uint16_t>(resp.bus_response),
96-
static_cast<uint16_t>(ex_resp.bus_response));
97-
EXPECT_EQ(resp.read_bytes, ex_resp.read_bytes);
96+
EXPECT_EQ(static_cast<uint16_t>(resp.read_bytes),
97+
static_cast<uint16_t>(ex_resp.read_bytes));
9898
}

0 commit comments

Comments
 (0)