mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-06 03:40:16 +00:00
gatt_service_server: update HEART_RATE_SERVER(read_callback_test)
This commit is contained in:
parent
5454eebde8
commit
830f16a14c
@ -64,17 +64,21 @@ TEST(HEART_RATE_SERVER, read_callback_test){
|
|||||||
response_len = mock_att_service_read_callback(con_handle, 0xffff, 0xffff, response, sizeof(response));
|
response_len = mock_att_service_read_callback(con_handle, 0xffff, 0xffff, response, sizeof(response));
|
||||||
CHECK_EQUAL(0, response_len);
|
CHECK_EQUAL(0, response_len);
|
||||||
|
|
||||||
|
// get location value length (1 byte length)
|
||||||
|
response_len = mock_att_service_read_callback(con_handle, body_sensor_location_value_handle, 0, NULL, 0);
|
||||||
|
CHECK_EQUAL(1, response_len);
|
||||||
|
|
||||||
|
// get location value (1 byte length)
|
||||||
response_len = mock_att_service_read_callback(con_handle, body_sensor_location_value_handle, 0, response, sizeof(response));
|
response_len = mock_att_service_read_callback(con_handle, body_sensor_location_value_handle, 0, response, sizeof(response));
|
||||||
CHECK_EQUAL(1, response_len);
|
CHECK_EQUAL(1, response_len);
|
||||||
|
|
||||||
response_len = mock_att_service_read_callback(con_handle, body_sensor_location_value_handle, 0, response, 0);
|
// get rate measurement configuration length (2 byte length)
|
||||||
CHECK_EQUAL(0, response_len);
|
response_len = mock_att_service_read_callback(con_handle, heart_rate_measurement_configuration_handle, 0, NULL, 0);
|
||||||
|
|
||||||
response_len = mock_att_service_read_callback(con_handle, heart_rate_measurement_configuration_handle, 0, response, sizeof(response));
|
|
||||||
CHECK_EQUAL(2, response_len);
|
CHECK_EQUAL(2, response_len);
|
||||||
|
|
||||||
response_len = mock_att_service_read_callback(con_handle, heart_rate_measurement_configuration_handle, 0, response, 0);
|
// get rate measurement configuration (2 byte length)
|
||||||
CHECK_EQUAL(0, response_len);
|
response_len = mock_att_service_read_callback(con_handle, heart_rate_measurement_configuration_handle, 0, response, sizeof(response));
|
||||||
|
CHECK_EQUAL(2, response_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main (int argc, const char * argv[]){
|
int main (int argc, const char * argv[]){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user