2222
2323DEFINE_FFF_GLOBALS ;
2424
25- FAKE_VALUE_FUNC ( int , bt_le_oob_get_local , uint8_t , struct bt_le_oob * );
25+ FAKE_VOID_FUNC ( bt_id_get , bt_addr_le_t * , size_t * );
2626FAKE_VALUE_FUNC (int , modem_jwt_get_uuids , struct nrf_device_uuid * , struct nrf_modem_fw_uuid * );
2727FAKE_VALUE_FUNC (struct net_if * , net_if_get_default );
2828FAKE_VALUE_FUNC (ssize_t , z_impl_hwinfo_get_device_id , uint8_t * , size_t );
@@ -38,20 +38,20 @@ static struct net_if net_if_example = {
3838 .if_dev = & net_if_dev_example
3939};
4040
41- static struct bt_le_oob bt_le_oob_example = {
42- .addr . a .val = {0x11 , 0x22 , 0x33 , 0x44 , 0x55 , 0x66 }
41+ static bt_addr_le_t bt_addr_example = {
42+ .a .val = {0x11 , 0x22 , 0x33 , 0x44 , 0x55 , 0x66 }
4343};
4444static uint8_t serial_nr [8 ] = {0x11 , 0x22 , 0x33 , 0x44 , 0x55 , 0x66 , 0x77 , 0x88 };
4545static struct nrf_device_uuid uuid_example = {
4646 .str = "7439023c-5467-11ed-a841-1b85829d924f"
4747};
4848static const char imei [] = "985802356545846" ;
4949
50- static int custom_bt_le_oob_get_local ( uint8_t id , struct bt_le_oob * oob )
50+ static void custom_bt_id_get ( bt_addr_le_t * addrs , size_t * count )
5151{
52- TEST_ASSERT_EQUAL (BT_ID_DEFAULT , id );
53- * oob = bt_le_oob_example ;
54- return 0 ;
52+ TEST_ASSERT_EQUAL (* count , 1 );
53+ * addrs = bt_addr_example ;
54+ * count = 1 ;
5555}
5656
5757static ssize_t custom_z_impl_hwinfo_get_device_id (uint8_t * buffer , size_t length )
@@ -80,12 +80,12 @@ static int custom_nrf_modem_at_cmd(void *buf, size_t len, const char *fmt, va_li
8080
8181void setUp (void )
8282{
83- RESET_FAKE (bt_le_oob_get_local );
83+ RESET_FAKE (bt_id_get );
8484 RESET_FAKE (modem_jwt_get_uuids );
8585 RESET_FAKE (net_if_get_default );
8686 RESET_FAKE (z_impl_hwinfo_get_device_id );
8787 RESET_FAKE (nrf_modem_at_cmd );
88- bt_le_oob_get_local_fake .custom_fake = custom_bt_le_oob_get_local ;
88+ bt_id_get_fake .custom_fake = custom_bt_id_get ;
8989 modem_jwt_get_uuids_fake .custom_fake = custom_modem_jwt_get_uuids ;
9090 net_if_get_default_fake .return_val = & net_if_example ;
9191 z_impl_hwinfo_get_device_id_fake .custom_fake = custom_z_impl_hwinfo_get_device_id ;
0 commit comments