Loading system/test/mock/mock_main_shim_acl_api.cc +12 −0 Original line number Diff line number Diff line Loading @@ -86,3 +86,15 @@ void bluetooth::shim::ACL_RemoveFromAddressResolution( void bluetooth::shim::ACL_ClearAddressResolution() { mock_function_count_map[__func__]++; } void bluetooth::shim::ACL_LeSetDefaultSubrate(uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout) { mock_function_count_map[__func__]++; } void bluetooth::shim::ACL_LeSubrateRequest( uint16_t hci_handle, uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout) { mock_function_count_map[__func__]++; } system/test/mock/mock_main_shim_acl_api.h +33 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,39 @@ struct ACL_ClearFilterAcceptList { }; extern struct ACL_ClearFilterAcceptList ACL_ClearFilterAcceptList; // Name: ACL_LeSetDefaultSubrate // Params: // Return: void struct ACL_LeSetDefaultSubrate { std::function<void(uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout)> body{[](uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout) {}}; void operator()(uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout) { body(subrate_min, subrate_max, max_latency, cont_num, sup_tout); }; }; extern struct ACL_LeSetDefaultSubrate ACL_LeSetDefaultSubrate; // Name: ACL_LeSubrateRequest // Params: // Return: void struct ACL_LeSubrateRequest { std::function<void(uint16_t hci_handle, uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout)> body{[](uint16_t hci_handle, uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout) {}}; void operator()(uint16_t hci_handle, uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout) { body(hci_handle, subrate_min, subrate_max, max_latency, cont_num, sup_tout); }; }; extern struct ACL_LeSubrateRequest ACL_LeSubrateRequest; // Name: ACL_ConfigureLePrivacy // Params: bool is_le_privacy_enabled // Return: void Loading system/test/mock/mock_stack_acl.cc +15 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,10 @@ struct acl_peer_supports_ble_connection_parameters_request struct acl_peer_supports_ble_packet_extension acl_peer_supports_ble_packet_extension; struct acl_peer_supports_sniff_subrating acl_peer_supports_sniff_subrating; struct acl_peer_supports_ble_connection_subrating acl_peer_supports_ble_connection_subrating; struct acl_peer_supports_ble_connection_subrating_host acl_peer_supports_ble_connection_subrating_host; struct acl_refresh_remote_address acl_refresh_remote_address; struct acl_set_peer_le_features_from_handle acl_set_peer_le_features_from_handle; Loading Loading @@ -269,6 +273,17 @@ bool acl_peer_supports_sniff_subrating(const RawAddress& remote_bda) { mock_function_count_map[__func__]++; return test::mock::stack_acl::acl_peer_supports_sniff_subrating(remote_bda); } bool acl_peer_supports_ble_connection_subrating(const RawAddress& remote_bda) { mock_function_count_map[__func__]++; return test::mock::stack_acl::acl_peer_supports_ble_connection_subrating( remote_bda); } bool acl_peer_supports_ble_connection_subrating_host( const RawAddress& remote_bda) { mock_function_count_map[__func__]++; return test::mock::stack_acl::acl_peer_supports_ble_connection_subrating_host( remote_bda); } bool acl_refresh_remote_address(const RawAddress& identity_address, tBLE_ADDR_TYPE identity_address_type, const RawAddress& bda, Loading system/test/mock/mock_stack_acl.h +20 −0 Original line number Diff line number Diff line Loading @@ -268,6 +268,26 @@ struct acl_peer_supports_sniff_subrating { }; extern struct acl_peer_supports_sniff_subrating acl_peer_supports_sniff_subrating; // Name: acl_peer_supports_ble_connection_subrating // Params: const RawAddress& remote_bda // Returns: bool struct acl_peer_supports_ble_connection_subrating { std::function<bool(const RawAddress& remote_bda)> body{ [](const RawAddress& remote_bda) { return false; }}; bool operator()(const RawAddress& remote_bda) { return body(remote_bda); }; }; extern struct acl_peer_supports_ble_connection_subrating acl_peer_supports_ble_connection_subrating; // Name: acl_peer_supports_ble_connection_subrating_host // Params: const RawAddress& remote_bda // Returns: bool struct acl_peer_supports_ble_connection_subrating_host { std::function<bool(const RawAddress& remote_bda)> body{ [](const RawAddress& remote_bda) { return false; }}; bool operator()(const RawAddress& remote_bda) { return body(remote_bda); }; }; extern struct acl_peer_supports_ble_connection_subrating_host acl_peer_supports_ble_connection_subrating_host; // Name: acl_refresh_remote_address // Params: const RawAddress& identity_address, tBLE_ADDR_TYPE // identity_address_type, const RawAddress& bda, tBLE_ADDR_TYPE rra_type, Loading system/test/mock/mock_stack_gatt_main.cc +5 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,11 @@ void gatt_notify_phy_updated(tGATT_STATUS status, uint16_t handle, uint8_t tx_phy, uint8_t rx_phy) { mock_function_count_map[__func__]++; } void gatt_notify_subrate_change(uint16_t handle, uint16_t subrate_factor, uint16_t latency, uint16_t cont_num, uint16_t timeout, uint8_t status) { mock_function_count_map[__func__]++; } void gatt_proc_srv_chg(void) { mock_function_count_map[__func__]++; } void gatt_send_srv_chg_ind(const RawAddress& peer_bda) { mock_function_count_map[__func__]++; Loading Loading
system/test/mock/mock_main_shim_acl_api.cc +12 −0 Original line number Diff line number Diff line Loading @@ -86,3 +86,15 @@ void bluetooth::shim::ACL_RemoveFromAddressResolution( void bluetooth::shim::ACL_ClearAddressResolution() { mock_function_count_map[__func__]++; } void bluetooth::shim::ACL_LeSetDefaultSubrate(uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout) { mock_function_count_map[__func__]++; } void bluetooth::shim::ACL_LeSubrateRequest( uint16_t hci_handle, uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout) { mock_function_count_map[__func__]++; }
system/test/mock/mock_main_shim_acl_api.h +33 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,39 @@ struct ACL_ClearFilterAcceptList { }; extern struct ACL_ClearFilterAcceptList ACL_ClearFilterAcceptList; // Name: ACL_LeSetDefaultSubrate // Params: // Return: void struct ACL_LeSetDefaultSubrate { std::function<void(uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout)> body{[](uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout) {}}; void operator()(uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout) { body(subrate_min, subrate_max, max_latency, cont_num, sup_tout); }; }; extern struct ACL_LeSetDefaultSubrate ACL_LeSetDefaultSubrate; // Name: ACL_LeSubrateRequest // Params: // Return: void struct ACL_LeSubrateRequest { std::function<void(uint16_t hci_handle, uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout)> body{[](uint16_t hci_handle, uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout) {}}; void operator()(uint16_t hci_handle, uint16_t subrate_min, uint16_t subrate_max, uint16_t max_latency, uint16_t cont_num, uint16_t sup_tout) { body(hci_handle, subrate_min, subrate_max, max_latency, cont_num, sup_tout); }; }; extern struct ACL_LeSubrateRequest ACL_LeSubrateRequest; // Name: ACL_ConfigureLePrivacy // Params: bool is_le_privacy_enabled // Return: void Loading
system/test/mock/mock_stack_acl.cc +15 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,10 @@ struct acl_peer_supports_ble_connection_parameters_request struct acl_peer_supports_ble_packet_extension acl_peer_supports_ble_packet_extension; struct acl_peer_supports_sniff_subrating acl_peer_supports_sniff_subrating; struct acl_peer_supports_ble_connection_subrating acl_peer_supports_ble_connection_subrating; struct acl_peer_supports_ble_connection_subrating_host acl_peer_supports_ble_connection_subrating_host; struct acl_refresh_remote_address acl_refresh_remote_address; struct acl_set_peer_le_features_from_handle acl_set_peer_le_features_from_handle; Loading Loading @@ -269,6 +273,17 @@ bool acl_peer_supports_sniff_subrating(const RawAddress& remote_bda) { mock_function_count_map[__func__]++; return test::mock::stack_acl::acl_peer_supports_sniff_subrating(remote_bda); } bool acl_peer_supports_ble_connection_subrating(const RawAddress& remote_bda) { mock_function_count_map[__func__]++; return test::mock::stack_acl::acl_peer_supports_ble_connection_subrating( remote_bda); } bool acl_peer_supports_ble_connection_subrating_host( const RawAddress& remote_bda) { mock_function_count_map[__func__]++; return test::mock::stack_acl::acl_peer_supports_ble_connection_subrating_host( remote_bda); } bool acl_refresh_remote_address(const RawAddress& identity_address, tBLE_ADDR_TYPE identity_address_type, const RawAddress& bda, Loading
system/test/mock/mock_stack_acl.h +20 −0 Original line number Diff line number Diff line Loading @@ -268,6 +268,26 @@ struct acl_peer_supports_sniff_subrating { }; extern struct acl_peer_supports_sniff_subrating acl_peer_supports_sniff_subrating; // Name: acl_peer_supports_ble_connection_subrating // Params: const RawAddress& remote_bda // Returns: bool struct acl_peer_supports_ble_connection_subrating { std::function<bool(const RawAddress& remote_bda)> body{ [](const RawAddress& remote_bda) { return false; }}; bool operator()(const RawAddress& remote_bda) { return body(remote_bda); }; }; extern struct acl_peer_supports_ble_connection_subrating acl_peer_supports_ble_connection_subrating; // Name: acl_peer_supports_ble_connection_subrating_host // Params: const RawAddress& remote_bda // Returns: bool struct acl_peer_supports_ble_connection_subrating_host { std::function<bool(const RawAddress& remote_bda)> body{ [](const RawAddress& remote_bda) { return false; }}; bool operator()(const RawAddress& remote_bda) { return body(remote_bda); }; }; extern struct acl_peer_supports_ble_connection_subrating_host acl_peer_supports_ble_connection_subrating_host; // Name: acl_refresh_remote_address // Params: const RawAddress& identity_address, tBLE_ADDR_TYPE // identity_address_type, const RawAddress& bda, tBLE_ADDR_TYPE rra_type, Loading
system/test/mock/mock_stack_gatt_main.cc +5 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,11 @@ void gatt_notify_phy_updated(tGATT_STATUS status, uint16_t handle, uint8_t tx_phy, uint8_t rx_phy) { mock_function_count_map[__func__]++; } void gatt_notify_subrate_change(uint16_t handle, uint16_t subrate_factor, uint16_t latency, uint16_t cont_num, uint16_t timeout, uint8_t status) { mock_function_count_map[__func__]++; } void gatt_proc_srv_chg(void) { mock_function_count_map[__func__]++; } void gatt_send_srv_chg_ind(const RawAddress& peer_bda) { mock_function_count_map[__func__]++; Loading