Diff between 16fd0ed58361b50be6eb452a1e6be577fac29f55 and 29d3fdcaf93bd29842028f9b6cc259ce5732d3f5

Changed Files

File Additions Deletions Status
unit/test-gatt.c +21 -0 modified

Full Patch

diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index f343fe6..a2ca5b6 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -334,6 +334,17 @@ static void test_search_chars(gconstpointer data)
 	execute_context(context);
 }
 
+static void test_search_descs(gconstpointer data)
+{
+	struct context *context = create_context(512, data);
+
+	g_assert(bt_gatt_discover_descriptors(context->att, 0x0013, 0x0016,
+							generic_search_cb,
+							context, NULL));
+
+	execute_context(context);
+}
+
 int main(int argc, char *argv[])
 {
 	g_test_init(&argc, &argv, NULL);
@@ -429,5 +440,15 @@ int main(int argc, char *argv[])
 			raw_pdu(0x08, 0x14, 0x00, 0x20, 0x00, 0x03, 0x28),
 			raw_pdu(0x01, 0x08, 0x12, 0x00, 0x0a));
 
+	define_test("/TP/GAD/CL/BV-06-C", test_search_descs, ATT, NULL,
+			raw_pdu(0x02, 0x00, 0x02),
+			raw_pdu(0x03, 0x00, 0x02),
+			raw_pdu(0x04, 0x13, 0x00, 0x16, 0x00),
+			raw_pdu(0x05, 0x01, 0x13, 0x00, 0x02, 0x29, 0x14, 0x00,
+					0x03, 0x29),
+			raw_pdu(0x04, 0x15, 0x00, 0x16, 0x00),
+			raw_pdu(0x05, 0x01, 0x15, 0x00, 0x04, 0x29, 0x16, 0x00,
+					0x05, 0x29));
+
 	return g_test_run();
 }