diff options
Diffstat (limited to 'net/nimble/host/src/test/ble_gatt_find_s_test.c')
-rw-r--r-- | net/nimble/host/src/test/ble_gatt_find_s_test.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/net/nimble/host/src/test/ble_gatt_find_s_test.c b/net/nimble/host/src/test/ble_gatt_find_s_test.c index dca1f367..c3ab93df 100644 --- a/net/nimble/host/src/test/ble_gatt_find_s_test.c +++ b/net/nimble/host/src/test/ble_gatt_find_s_test.c @@ -46,17 +46,25 @@ ble_gatt_find_s_test_misc_init(void) static int ble_gatt_find_s_test_misc_cb(uint16_t conn_handle, - struct ble_gatt_error *error, - struct ble_gatt_svc *service, + const struct ble_gatt_error *error, + const struct ble_gatt_svc *service, void *arg) { TEST_ASSERT(!ble_gatt_find_s_test_proc_complete); - TEST_ASSERT(error == NULL); + TEST_ASSERT(error != NULL); - if (service == NULL) { - ble_gatt_find_s_test_proc_complete = 1; - } else { + switch (error->status) { + case 0: ble_gatt_find_s_test_svcs[ble_gatt_find_s_test_num_svcs++] = *service; + break; + + case BLE_HS_EDONE: + ble_gatt_find_s_test_proc_complete = 1; + break; + + default: + TEST_ASSERT(0); + break; } return 0; @@ -320,6 +328,8 @@ TEST_CASE(ble_gatt_find_s_test_1) TEST_SUITE(ble_gatt_find_s_test_suite) { + tu_suite_set_post_test_cb(ble_hs_test_util_post_test, NULL); + ble_gatt_find_s_test_1(); } |