From 1573ebb8525cfe2b687c3a6d2bbbdd5cc06c44f0 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 4 Jun 2014 18:06:12 +0300 Subject: [PATCH] unit/test-avrcp: Add /TP/RCR/BV-04-C test To verify the TG can accept abort fragmentation correctly. --- unit/test-avrcp.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c index eddce410f..e8cf34afb 100644 --- a/unit/test-avrcp.c +++ b/unit/test-avrcp.c @@ -500,7 +500,7 @@ static int get_element_attributes(struct avrcp *session, uint8_t transaction, DBG(""); - if (g_str_equal(context->data->test_name, "/TP/RCR/BV-02-C")) { + if (g_str_has_prefix(context->data->test_name, "/TP/RCR")) { uint8_t params[1024]; memset(params, 0x00, sizeof(params) / 2); @@ -1666,5 +1666,21 @@ int main(int argc, char *argv[]) 0x00, 0x19, 0x58, AVRCP_GET_ELEMENT_ATTRIBUTES, 0x03, 0x00, 0x0e)); + /* Abort continuing response - TG */ + define_test("/TP/RCR/BV-04-C", test_server, + raw_pdu(0x00, 0x11, 0x0e, 0x01, 0x48, 0x00, + 0x00, 0x19, 0x58, AVRCP_GET_ELEMENT_ATTRIBUTES, + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00), + cont_pdu(0x02, 0x11, 0x0e, 0x0c, 0x48, 0x00, + 0x00, 0x19, 0x58, AVRCP_GET_ELEMENT_ATTRIBUTES, + 0x01, 0x01, 0xf9), + raw_pdu(0x00, 0x11, 0x0e, 0x00, 0x48, 0x00, + 0x00, 0x19, 0x58, AVRCP_ABORT_CONTINUING, + 0x00, 0x00, 0x01, AVRCP_GET_ELEMENT_ATTRIBUTES), + raw_pdu(0x02, 0x11, 0x0e, 0x09, 0x48, 0x00, + 0x00, 0x19, 0x58, AVRCP_ABORT_CONTINUING, + 0x00, 0x00, 0x00)); + return g_test_run(); } -- 2.47.3