fix failed DiscBleTest

Signed-off-by: guowen666 <guowen31@huawei.com>
This commit is contained in:
guowen666 2024-01-27 18:27:14 +08:00
parent 3b6f82349e
commit b0d16f231b
3 changed files with 8 additions and 11 deletions

View File

@ -60,15 +60,9 @@ ohos_unittest("DiscBleTest") {
]
if (is_standard_system) {
external_deps = [
"c_utils:utils",
"hilog:libhilog",
]
external_deps = [ "c_utils:utils" ]
} else {
external_deps = [
"c_utils:utils",
"hilog:libhilog",
]
external_deps = [ "c_utils:utils" ]
}
}

View File

@ -324,9 +324,9 @@ int32_t BleMock::ActionOfUpdateAdvForActiveDiscovery(
ShowAdvData(bcId, packet);
if (packet->bcData.payloadLen != sizeof(activeDiscoveryAdvData2) ||
packet->rspData.payloadLen != sizeof(activeDiscoveryRspData) ||
packet->rspData.payloadLen != sizeof(activeDiscoveryRspData2) ||
memcmp(packet->bcData.payload, activeDiscoveryAdvData2, packet->bcData.payloadLen) != 0 ||
memcmp(packet->rspData.payload, activeDiscoveryRspData, packet->rspData.payloadLen) != 0) {
memcmp(packet->rspData.payload, activeDiscoveryRspData2, packet->rspData.payloadLen) != 0) {
isAsyncAdvertiseSuccess = false;
GetMock()->AsyncAdvertiseDone();
return SOFTBUS_ERR;

View File

@ -16,4 +16,7 @@ import("../../dsoftbus.gni")
test_utils_src =
[ "$dsoftbus_root_path/tests/utils/exception_branch_checker.cpp" ]
test_utils_inc = [ "$dsoftbus_root_path/tests/utils" ]
test_utils_inc = [
"$dsoftbus_root_path/tests/utils",
"//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
]