Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a9946f0 authored by Chris Manton's avatar Chris Manton
Browse files

mock: [40/63] Remove BTM_ReadRemoteDeviceName

Use get_btm_client_interface() instead

Bug: 352129816
Test: m .
Flag: EXEMPT, Test infrastructure

Change-Id: I6d2b45e207c41c9625242e3025b80262383501fa
parent 013f912e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -139,8 +139,6 @@ TEST_F(BtaSecTest, bta_dm_sp_cback__BTM_SP_CFM_REQ_EVT_WithoutName_RNRSuccess) {
          btm_status_text(bluetooth::legacy::testing::bta_dm_sp_cback(BTM_SP_CFM_REQ_EVT, &data)));
  ASSERT_EQ(kNumVal, bta_dm_sec_cb.num_val);
  ASSERT_FALSE(callback_sent);

  test::mock::stack_btm_inq::BTM_ReadRemoteDeviceName = {};
}

TEST_F(BtaSecTest, bta_dm_sp_cback__BTM_SP_CFM_REQ_EVT_WithoutName_RNRFail) {
+0 −8
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ struct BTM_EnableInterlacedInquiryScan BTM_EnableInterlacedInquiryScan;
struct BTM_EnableInterlacedPageScan BTM_EnableInterlacedPageScan;
struct BTM_HasEirService BTM_HasEirService;
struct BTM_IsInquiryActive BTM_IsInquiryActive;
struct BTM_ReadRemoteDeviceName BTM_ReadRemoteDeviceName;
struct BTM_RemoveEirService BTM_RemoveEirService;
struct BTM_SetConnectability BTM_SetConnectability;
struct BTM_SetDiscoverability BTM_SetDiscoverability;
@@ -72,7 +71,6 @@ namespace stack_btm_inq {

bool BTM_HasEirService::return_value = false;
uint16_t BTM_IsInquiryActive::return_value = 0;
tBTM_STATUS BTM_ReadRemoteDeviceName::return_value = BTM_SUCCESS;
tBTM_STATUS BTM_SetConnectability::return_value = BTM_SUCCESS;
tBTM_STATUS BTM_SetDiscoverability::return_value = BTM_SUCCESS;
tBTM_STATUS BTM_SetInquiryMode::return_value = BTM_SUCCESS;
@@ -107,12 +105,6 @@ uint16_t BTM_IsInquiryActive(void) {
  inc_func_call_count(__func__);
  return test::mock::stack_btm_inq::BTM_IsInquiryActive();
}

tBTM_STATUS BTM_ReadRemoteDeviceName(const RawAddress& remote_bda, tBTM_NAME_CMPL_CB* p_cb,
                                     tBT_TRANSPORT transport) {
  inc_func_call_count(__func__);
  return test::mock::stack_btm_inq::BTM_ReadRemoteDeviceName(remote_bda, p_cb, transport);
}
void BTM_RemoveEirService(uint32_t* p_eir_uuid, uint16_t uuid16) {
  inc_func_call_count(__func__);
  test::mock::stack_btm_inq::BTM_RemoveEirService(p_eir_uuid, uuid16);
+0 −16
Original line number Diff line number Diff line
@@ -96,22 +96,6 @@ struct BTM_IsInquiryActive {
};
extern struct BTM_IsInquiryActive BTM_IsInquiryActive;

// Name: BTM_ReadRemoteDeviceName
// Params: const RawAddress& remote_bda, tBTM_NAME_CMPL_CB* p_cb, tBT_TRANSPORT
// transport Return: tBTM_STATUS
struct BTM_ReadRemoteDeviceName {
  static tBTM_STATUS return_value;
  std::function<tBTM_STATUS(const RawAddress& remote_bda, tBTM_NAME_CMPL_CB* p_cb,
                            tBT_TRANSPORT transport)>
          body{[](const RawAddress& /* remote_bda */, tBTM_NAME_CMPL_CB* /* p_cb */,
                  tBT_TRANSPORT /* transport */) { return return_value; }};
  tBTM_STATUS operator()(const RawAddress& remote_bda, tBTM_NAME_CMPL_CB* p_cb,
                         tBT_TRANSPORT transport) {
    return body(remote_bda, p_cb, transport);
  }
};
extern struct BTM_ReadRemoteDeviceName BTM_ReadRemoteDeviceName;

// Name: BTM_RemoveEirService
// Params: uint32_t* p_eir_uuid, uint16_t uuid16
// Return: void