diff options
author | Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com> | 2014-01-14 14:54:42 +0100 |
---|---|---|
committer | Szymon Janc <szymon.janc@gmail.com> | 2014-01-14 19:30:59 +0100 |
commit | d69ac36ae7087a71ae988a39f5b79ca45044fac1 (patch) | |
tree | 9cc06875c9ff1a5b9ed8f2bfb85c7ce328ab96bf /android | |
parent | 8b2a398f5fe16498f29a3e9f007fb24f035e38a1 (diff) |
android/tester: Add get device SCAN_MODE property fail test case
This adds device SCAN MODE property fail test case.
Diffstat (limited to 'android')
-rw-r--r-- | android/android-tester.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/android/android-tester.c b/android/android-tester.c index 1d1b05df3..76a16b484 100644 --- a/android/android-tester.c +++ b/android/android-tester.c @@ -1497,6 +1497,27 @@ static const struct generic_data bt_dev_getprop_servrec_fail_test = { .expected_adapter_status = BT_STATUS_FAIL, }; +static bt_scan_mode_t remote_getprop_scanmode_val = BT_SCAN_MODE_CONNECTABLE; + +static struct priority_property remote_getprop_scanmode_props[] = { + { + .prop.type = BT_PROPERTY_ADAPTER_SCAN_MODE, + .prop.val = &remote_getprop_scanmode_val, + .prop.len = sizeof(remote_getprop_scanmode_val), + }, +}; + +static const struct generic_data bt_dev_getprop_scanmode_fail_test = { + .expected_hal_cb.discovery_state_changed_cb = + remote_discovery_state_changed_cb, + .expected_hal_cb.device_found_cb = remote_get_property_device_found_cb, + .expected_hal_cb.remote_device_properties_cb = + remote_test_device_properties_cb, + .expected_cb_count = 3, + .expected_properties = remote_getprop_scanmode_props, + .expected_adapter_status = BT_STATUS_FAIL, +}; + static bt_callbacks_t bt_callbacks = { .size = sizeof(bt_callbacks), .adapter_state_changed_cb = adapter_state_changed_cb, @@ -2091,6 +2112,15 @@ static void test_dev_getprop_servrec_fail(const void *test_data) data->if_bluetooth->start_discovery(); } +static void test_dev_getprop_scanmode_fail(const void *test_data) +{ + struct test_data *data = tester_get_data(); + + init_test_conditions(data); + + data->if_bluetooth->start_discovery(); +} + /* Test Socket HAL */ static void adapter_socket_state_changed_cb(bt_state_t state) @@ -2738,6 +2768,11 @@ int main(int argc, char *argv[]) setup_enabled_adapter, test_dev_getprop_servrec_fail, teardown); + test_bredrle("Bluetooth Device Get SCAN_MODE - Fail", + &bt_dev_getprop_scanmode_fail_test, + setup_enabled_adapter, + test_dev_getprop_scanmode_fail, teardown); + test_bredrle("Socket Init", NULL, setup_socket_interface, test_dummy, teardown); |