Implement unit test for bt_adapter_le_is_scan_filter_supported() CAPI 09/246609/1
authorAyush Garg <ayush.garg@samsung.com>
Mon, 2 Nov 2020 09:28:39 +0000 (14:58 +0530)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 2 Nov 2020 09:28:39 +0000 (14:58 +0530)
Change-Id: I9e7b1b3d82c9fa2e40688d3270ee4f9daff52a64
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
tests/test/bt_unit_test.c
tests/test/bt_unit_test.h

index 7e8a534..b926a99 100644 (file)
@@ -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;
 
index 901937d..cf1d9bf 100644 (file)
@@ -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,