[PATCH BlueZ 3/8] unit/test-uhid: Add /uhid/command/destroy test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

---
 unit/test-uhid.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/unit/test-uhid.c b/unit/test-uhid.c
index e4b53e6..25216b8 100644
--- a/unit/test-uhid.c
+++ b/unit/test-uhid.c
@@ -227,6 +227,10 @@ static const struct uhid_event ev_create = {
 	.type = UHID_CREATE,
 };
 
+static const struct uhid_event ev_destroy = {
+	.type = UHID_DESTROY,
+};
+
 static void test_client(gconstpointer data)
 {
 	struct context *context = create_context(data);
@@ -234,6 +238,9 @@ static void test_client(gconstpointer data)
 	if (g_str_equal(context->data->test_name, "/uhid/command/create"))
 		bt_uhid_send(context->uhid, &ev_create);
 
+	if (g_str_equal(context->data->test_name, "/uhid/command/destroy"))
+		bt_uhid_send(context->uhid, &ev_destroy);
+
 	execute_context(context);
 }
 
@@ -242,6 +249,7 @@ int main(int argc, char *argv[])
 	g_test_init(&argc, &argv, NULL);
 
 	define_test("/uhid/command/create", test_client, event(&ev_create));
+	define_test("/uhid/command/destroy", test_client, event(&ev_destroy));
 
 	return g_test_run();
 }
-- 
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux