From: Ayush Garg Date: Mon, 2 Nov 2020 09:28:39 +0000 (+0530) Subject: Implement unit test for bt_adapter_le_is_scan_filter_supported() CAPI X-Git-Tag: accepted/tizen/unified/20201111.124823~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F09%2F246609%2F1;p=platform%2Fcore%2Fapi%2Fbluetooth.git Implement unit test for bt_adapter_le_is_scan_filter_supported() CAPI Change-Id: I9e7b1b3d82c9fa2e40688d3270ee4f9daff52a64 Signed-off-by: Ayush Garg --- diff --git a/tests/test/bt_unit_test.c b/tests/test/bt_unit_test.c index 7e8a534..b926a99 100644 --- a/tests/test/bt_unit_test.c +++ b/tests/test/bt_unit_test.c @@ -338,6 +338,8 @@ tc_table_t tc_adapter_le[] = { , BT_UNIT_TEST_FUNCTION_ADAPTER_LE_GET_LOCAL_OOB_EXT_DATA}, {"bt_adapter_le_set_remote_oob_ext_data" , BT_UNIT_TEST_FUNCTION_ADAPTER_LE_SET_REMOTE_OOB_EXT_DATA}, + {"bt_adapter_le_is_scan_filter_supported" + , BT_UNIT_TEST_FUNCTION_ADAPTER_LE_SCAN_FILTER_SUPPORT}, {"Register scan filter (Device Address)" , BT_UNIT_TEST_FUNCTION_ADAPTER_LE_REGISTER_SCAN_FILTER_DEVICE_ADDRESS}, {"Register scan filter (Device Name)" @@ -5380,6 +5382,15 @@ int test_input_callback(void *data) break; } + case BT_UNIT_TEST_FUNCTION_ADAPTER_LE_SCAN_FILTER_SUPPORT: { + bool is_scan_filter_supported = FALSE; + + ret = bt_adapter_le_is_scan_filter_supported(&is_scan_filter_supported); + TC_PRT("returns %s\n", __bt_get_error_message(ret)); + TC_PRT("Scan Filter Support [%s]", is_scan_filter_supported ? "YES" : "NO"); + break; + } + case BT_UNIT_TEST_FUNCTION_ADAPTER_LE_REGISTER_SCAN_FILTER_DEVICE_ADDRESS: { bt_scan_filter_h scan_filter; diff --git a/tests/test/bt_unit_test.h b/tests/test/bt_unit_test.h index 901937d..cf1d9bf 100644 --- a/tests/test/bt_unit_test.h +++ b/tests/test/bt_unit_test.h @@ -132,6 +132,7 @@ typedef enum { BT_UNIT_TEST_FUNCTION_ADAPTER_LE_ENABLE_PRIVACY, BT_UNIT_TEST_FUNCTION_ADAPTER_LE_GET_LOCAL_OOB_EXT_DATA, BT_UNIT_TEST_FUNCTION_ADAPTER_LE_SET_REMOTE_OOB_EXT_DATA, + BT_UNIT_TEST_FUNCTION_ADAPTER_LE_SCAN_FILTER_SUPPORT, BT_UNIT_TEST_FUNCTION_ADAPTER_LE_REGISTER_SCAN_FILTER_DEVICE_ADDRESS, BT_UNIT_TEST_FUNCTION_ADAPTER_LE_REGISTER_SCAN_FILTER_DEVICE_NAME, BT_UNIT_TEST_FUNCTION_ADAPTER_LE_REGISTER_SCAN_FILTER_SERVICE_UUID,