From 25812d50a06ccd2631810b4089e7cf4b5c03a5e2 Mon Sep 17 00:00:00 2001 From: jakllsch Date: Sun, 3 Jan 2016 15:16:10 +0000 Subject: [PATCH] Move MY*_ATF_CHECK_EQ debugging helper macros to before all functions. --- tests/lib/libusbhid/t_usbhid.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/lib/libusbhid/t_usbhid.c b/tests/lib/libusbhid/t_usbhid.c index 91a1a5ee4ed2..91abaa02a94f 100644 --- a/tests/lib/libusbhid/t_usbhid.c +++ b/tests/lib/libusbhid/t_usbhid.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_usbhid.c,v 1.6 2016/01/02 01:24:44 jakllsch Exp $ */ +/* $NetBSD: t_usbhid.c,v 1.7 2016/01/03 15:16:10 jakllsch Exp $ */ /* * Copyright (c) 2016 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: t_usbhid.c,v 1.6 2016/01/02 01:24:44 jakllsch Exp $"); +__RCSID("$NetBSD: t_usbhid.c,v 1.7 2016/01/03 15:16:10 jakllsch Exp $"); #include @@ -46,6 +46,15 @@ ATF_TC(check_hid_usage); ATF_TC(check_hid_get_data); ATF_TC(check_hid_set_data); +#define MYd_ATF_CHECK_EQ(d, v) \ + ATF_CHECK_EQ_MSG(d, v, "== %d", (d)) + +#define MYu_ATF_CHECK_EQ(d, v) \ + ATF_CHECK_EQ_MSG(d, v, "== %u", (d)) + +#define MYx_ATF_CHECK_EQ(d, v) \ + ATF_CHECK_EQ_MSG(d, v, "== 0x%x", (d)) + static const uint8_t range_test_report_descriptor[] = { 0x0b, 0x03, 0x00, 0x00, 0xff, // Usage 0x75, 0x20, // Report Size @@ -158,9 +167,6 @@ ATF_TC_HEAD(check_hid_usage, tc) atf_tc_set_md_var(tc, "descr", "Test libusbhid usage.c"); } -#define MYx_ATF_CHECK_EQ(d, v) \ - ATF_CHECK_EQ_MSG(d, v, "== %x", (d)) - ATF_TC_BODY(check_hid_usage, tc) { char usages_path[PATH_MAX]; @@ -202,12 +208,6 @@ ATF_TC_BODY(check_hid_usage, tc) 0xff2aff1b); } -#define MYd_ATF_CHECK_EQ(d, v) \ - ATF_CHECK_EQ_MSG(d, v, "== %d", (d)) - -#define MYu_ATF_CHECK_EQ(d, v) \ - ATF_CHECK_EQ_MSG(d, v, "== %u", (d)) - ATF_TC_HEAD(check_hid_logical_range, tc) {