From 38336af48cfd9b2ab8c90f214e2064ab173c943b Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 18 Nov 2020 11:43:13 +0100 Subject: [PATCH] test/gatt_client: update mocking code --- test/gatt_client/Makefile | 2 +- test/gatt_client/mock.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/test/gatt_client/Makefile b/test/gatt_client/Makefile index f329bff4e..89969b66f 100644 --- a/test/gatt_client/Makefile +++ b/test/gatt_client/Makefile @@ -4,7 +4,7 @@ CC = g++ BTSTACK_ROOT = ../.. -CFLAGS = -DUNIT_TEST -x c++ -g -Wall -Wnarrowing -Wconversion-null -I. -I../ -I${BTSTACK_ROOT}/src +CFLAGS = -DUNIT_TEST -x c++ -g -Wall -Wnarrowing -Wconversion-null -I. -I${BTSTACK_ROOT}/src CFLAGS += -fprofile-arcs -ftest-coverage LDFLAGS += -lCppUTest -lCppUTestExt diff --git a/test/gatt_client/mock.c b/test/gatt_client/mock.c index 05443df67..ed6bf1ca1 100644 --- a/test/gatt_client/mock.c +++ b/test/gatt_client/mock.c @@ -46,7 +46,17 @@ void mock_simulate_scan_response(void){ uint8_t packet[] = {0xE2, 0x13, 0xE2, 0x01, 0x34, 0xB1, 0xF7, 0xD1, 0x77, 0x9B, 0xCC, 0x09, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}; registered_hci_event_handler(HCI_EVENT_PACKET, 0, (uint8_t *)&packet, sizeof(packet)); } - +int gap_authenticated(hci_con_handle_t con_handle){ + UNUSED(con_handle); + return false; +} +int gap_encryption_key_size(hci_con_handle_t con_handle){ + UNUSED(con_handle); + return 0; +} +void sm_request_pairing(hci_con_handle_t con_handle){ + UNUSED(con_handle); +} void gap_start_scan(void){ } void gap_stop_scan(void){