[test]:Add SoftBusBtInit to fill in btGapCallback

Signed-off-by: huxianghao <huxianghao@huawei.com>
This commit is contained in:
huxianghao 2024-08-27 03:25:57 +00:00
parent b27e17ed3c
commit 27ef157699

View File

@ -118,6 +118,10 @@ static testing::AssertionResult PrepareBtStateListener(MockBluetooth &mocker, in
if (listenerId < 0) {
return testing::AssertionFailure() << "SoftBusAddBtStateListener failed";
}
int32_t ret = SoftBusBtInit();
EXPECT_EQ(ret, SOFTBUS_OK);
if (MockBluetooth::btGapCallback == nullptr) {
return testing::AssertionFailure() << "GapRegisterCallback is not invoke";
}