summaryrefslogtreecommitdiff
path: root/unit/test-avrcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'unit/test-avrcp.c')
-rw-r--r--unit/test-avrcp.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c
index 01307e679..9ffd44cfd 100644
--- a/unit/test-avrcp.c
+++ b/unit/test-avrcp.c
@@ -113,13 +113,6 @@ struct context {
tester_add(name, &data, NULL, function, NULL); \
} while (0)
-static void test_debug(const char *str, void *user_data)
-{
- const char *prefix = user_data;
-
- tester_debug("%s%s", prefix, str);
-}
-
static void test_free(gconstpointer user_data)
{
const struct test_data *data = user_data;
@@ -164,12 +157,13 @@ static gboolean send_pdu(gpointer user_data)
pdu = &context->data->pdu_list[context->pdu_offset++];
- if (pdu->browse)
+ if (pdu->browse) {
len = write(context->browse_fd, pdu->data, pdu->size);
- else
+ tester_monitor('<', 0x0000, 0x001b, pdu->data, len);
+ } else {
len = write(context->fd, pdu->data, pdu->size);
-
- util_hexdump('<', pdu->data, len, test_debug, "AVRCP: ");
+ tester_monitor('<', 0x0000, 0x0017, pdu->data, len);
+ }
g_assert_cmpint(len, ==, pdu->size);
@@ -215,8 +209,7 @@ static gboolean test_handler(GIOChannel *channel, GIOCondition cond,
g_assert(len > 0);
- if (g_test_verbose())
- util_hexdump('>', buf, len, test_debug, "AVRCP: ");
+ tester_monitor('>', 0x0000, 0x0017, buf, len);
if (!pdu->continuing)
g_assert_cmpint(len, ==, pdu->size);
@@ -254,7 +247,7 @@ static gboolean browse_test_handler(GIOChannel *channel, GIOCondition cond,
g_assert(len > 0);
- util_hexdump('>', buf, len, test_debug, "AVRCP: ");
+ tester_monitor('>', 0x0000, 0x001b, buf, len);
g_assert_cmpint(len, ==, pdu->size);