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

Commit e3b78fd8 authored by Chris Manton's avatar Chris Manton
Browse files

mock: [31/63] Remove BTM_IsDeviceUp

Use get_btm_client_interface() instead

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

Change-Id: Ica9a7fb05a98b969d1c23510535e3ae9e6889416
parent 30756ec0
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -97,7 +97,6 @@ namespace {
class FakeBtStack {
public:
  FakeBtStack() {
    test::mock::stack_btm_devctl::BTM_IsDeviceUp.body = []() { return true; };
    test::mock::stack_acl::acl_create_le_connection.body = [](const RawAddress& bd_addr) {
      return true;
    };
@@ -129,7 +128,6 @@ public:
  }

  ~FakeBtStack() {
    test::mock::stack_btm_devctl::BTM_IsDeviceUp = {};
    test::mock::stack_acl::acl_create_le_connection = {};
    test::mock::stack_acl::acl_send_data_packet_br_edr = {};
    test::mock::stack_acl::acl_send_data_packet_ble = {};
+0 −7
Original line number Diff line number Diff line
@@ -33,17 +33,10 @@ namespace test {
namespace mock {
namespace stack_btm_devctl {

struct BTM_IsDeviceUp BTM_IsDeviceUp;

}
}  // namespace mock
}  // namespace test

bool BTM_IsDeviceUp(void) {
  inc_func_call_count(__func__);
  return test::mock::stack_btm_devctl::BTM_IsDeviceUp();
}

tBTM_STATUS BTM_DeleteStoredLinkKey(const RawAddress* /* bd_addr */, tBTM_CMPL_CB* /* p_cb */) {
  inc_func_call_count(__func__);
  return BTM_SUCCESS;
+0 −7
Original line number Diff line number Diff line
@@ -19,13 +19,6 @@ namespace test {
namespace mock {
namespace stack_btm_devctl {

// Function state capture and return values, if needed
struct BTM_IsDeviceUp {
  std::function<bool()> body{[]() { return false; }};
  bool operator()() { return body(); }
};
extern struct BTM_IsDeviceUp BTM_IsDeviceUp;

}  // namespace stack_btm_devctl
}  // namespace mock
}  // namespace test