diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index a2ca5b6..712b117 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
g_test_add_data_func(name, &data, function); \
} while (0)
+#define define_test_att(name, function, bt_uuid, args...) \
+ define_test(name, function, ATT, bt_uuid, args)
+
+#define define_test_client(name, function, args...) \
+ define_test(name, function, CLIENT, NULL, args)
+
static bt_uuid_t uuid_16 = {
.type = BT_UUID16,
.value.u16 = 0x1800
* The test group objective is to verify Generic Attribute Profile
* Server Configuration.
*/
- define_test("/TP/GAC/CL/BV-01-C", test_client, CLIENT, NULL,
+
+ define_test_client("/TP/GAC/CL/BV-01-C", test_client,
raw_pdu(0x02, 0x00, 0x02));
/*
* The test group objective is to verify Generic Attribute Profile
* Discovery of Services and Service Characteristics.
*/
- define_test("/TP/GAD/CL/BV-01-C", test_search_primary, ATT, NULL,
+ define_test_att("/TP/GAD/CL/BV-01-C", test_search_primary, NULL,
raw_pdu(0x02, 0x00, 0x02),
raw_pdu(0x03, 0x00, 0x02),
raw_pdu(0x10, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28),
raw_pdu(0x10, 0x97, 0x00, 0xff, 0xff, 0x00, 0x28),
raw_pdu(0x01, 0x10, 0x97, 0x00, 0x0a));
- define_test("/TP/GAD/CL/BV-02-C-1", test_search_primary, ATT, &uuid_16,
+ define_test_att("/TP/GAD/CL/BV-02-C-1", test_search_primary, &uuid_16,
raw_pdu(0x02, 0x00, 0x02),
raw_pdu(0x03, 0x00, 0x02),
raw_pdu(0x06, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28, 0x00,
0x18),
raw_pdu(0x01, 0x06, 0x08, 0x00, 0x0a));
- define_test("/TP/GAD/CL/BV-02-C-2", test_search_primary, ATT, &uuid_128,
+ define_test_att("/TP/GAD/CL/BV-02-C-2", test_search_primary, &uuid_128,
raw_pdu(0x02, 0x00, 0x02),
raw_pdu(0x03, 0x00, 0x02),
raw_pdu(06, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28, 0xfb,
0x18, 0x00, 0x00),
raw_pdu(0x01, 0x06, 0x08, 0x00, 0x0a));
- define_test("/TP/GAD/CL/BV-03-C", test_search_included, ATT, NULL,
+ define_test_att("/TP/GAD/CL/BV-03-C", test_search_included, NULL,
raw_pdu(0x02, 0x00, 0x02),
raw_pdu(0x03, 0x00, 0x02),
raw_pdu(0x08, 0x01, 0x00, 0xff, 0xff, 0x02, 0x28),
raw_pdu(0x08, 0x06, 0x00, 0xff, 0xff, 0x02, 0x28),
raw_pdu(0x01, 0x08, 0x06, 0x00, 0x0a));
- define_test("/TP/GAD/CL/BV-04-C", test_search_chars, ATT, NULL,
+ define_test_att("/TP/GAD/CL/BV-04-C", test_search_chars, NULL,
raw_pdu(0x02, 0x00, 0x02),
raw_pdu(0x03, 0x00, 0x02),
raw_pdu(0x08, 0x10, 0x00, 0x20, 0x00, 0x03, 0x28),
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,
+ define_test_att("/TP/GAD/CL/BV-06-C", test_search_descs, NULL,
raw_pdu(0x02, 0x00, 0x02),
raw_pdu(0x03, 0x00, 0x02),
raw_pdu(0x04, 0x13, 0x00, 0x16, 0x00),