Diff between 3b6585276b6ac2a5ccb6ee0017da355962304a69 and cd59f96561463989096c7d4f37bdb0640cb6e20a

Changed Files

File Additions Deletions Status
android/android-tester.c +29 -0 modified

Full Patch

diff --git a/android/android-tester.c b/android/android-tester.c
index 15f427c..c548e35 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -833,6 +833,17 @@ static const struct generic_data
 	.set_property.len = sizeof(setprop_bonded_devices),
 };
 
+static uint32_t getprop_cod = 0;
+
+static const struct generic_data bluetooth_getprop_cod_success_test = {
+	.expected_hal_cb.adapter_properties_cb = getprop_success_cb,
+	.expected_cb_count = 1,
+	.expected_adapter_status = BT_STATUS_SUCCESS,
+	.expected_property.type = BT_PROPERTY_CLASS_OF_DEVICE,
+	.expected_property.val = &getprop_cod,
+	.expected_property.len = sizeof(getprop_cod),
+};
+
 static const struct generic_data bluetooth_discovery_start_success_test = {
 	.expected_hal_cb.discovery_state_changed_cb =
 						discovery_start_success_cb,
@@ -1208,6 +1219,19 @@ static void test_setprop_bonded_devices_invalid(const void *test_data)
 	check_expected_status(adapter_status);
 }
 
+static void test_getprop_cod_success(const void *test_data)
+{
+	struct test_data *data = tester_get_data();
+	const struct generic_data *test = data->test_data;
+	const bt_property_t prop = test->expected_property;
+	bt_status_t adapter_status;
+
+	init_test_conditions(data);
+
+	adapter_status = data->if_bluetooth->get_adapter_property(prop.type);
+	check_expected_status(adapter_status);
+}
+
 static void test_discovery_start_success(const void *test_data)
 {
 	struct test_data *data = tester_get_data();
@@ -1782,6 +1806,11 @@ int main(int argc, char *argv[])
 				setup_enabled_adapter,
 				test_setprop_bonded_devices_invalid, teardown);
 
+	test_bredrle("Bluetooth Get CLASS_OF_DEVICE - Success",
+					&bluetooth_getprop_cod_success_test,
+					setup_enabled_adapter,
+					test_getprop_cod_success, teardown);
+
 	test_bredrle("Bluetooth BREDR Discovery Start - Success",
 				&bluetooth_discovery_start_success_test,
 				setup_enabled_adapter,