Skip to content

Commit a9bd22e

Browse files
committed
Update unit tests to reflect changes in bristlemouth module
1 parent ebc634b commit a9bd22e

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

test/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,8 @@ set(BRISTLEMOUTH_SRCS
519519
${STUB_DIR}/bm_adin2111_stub.c
520520
${STUB_DIR}/bcmp_stub.c
521521
${STUB_DIR}/bm_ip_stub.c
522+
${STUB_DIR}/configuration_stub.c
523+
${STUB_DIR}/device_stub.c
522524
${STUB_DIR}/l2_stub.c
523525
${STUB_DIR}/bm_service_stub.c
524526
${STUB_DIR}/topology_stub.c

test/src/bristlemouth_test.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,21 @@ FAKE_VALUE_FUNC(BmErr, bm_middleware_init, uint16_t);
1313
FAKE_VOID_FUNC(netdev_power_cb, bool);
1414

1515
TEST(Bristlemouth, init) {
16-
BmErr err = bristlemouth_init(netdev_power_cb);
16+
DeviceCfg device = {
17+
.node_id = 0,
18+
.git_sha = 0,
19+
.device_name = "none",
20+
.version_string = "none",
21+
.vendor_id = 0,
22+
.product_id = 0,
23+
.hw_ver = 0,
24+
.ver_major = 0,
25+
.ver_minor = 0,
26+
.ver_patch = 0,
27+
.sn = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c',
28+
'd', 'e', 'f'},
29+
};
30+
BmErr err = bristlemouth_init(netdev_power_cb, device);
1731
EXPECT_EQ(err, BmOK);
1832
}
1933

0 commit comments

Comments
 (0)