Diff between 6e241c877b1db1edc632cab99f8b22452567577d and 87779c55720b116aeef5167d7615b7b8e528dee6

Changed Files

File Additions Deletions Status
unit/test-uhid.c +8 -0 modified

Full Patch

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();
 }