Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libusbhid reorganize constant test data
details: https://anonhg.NetBSD.org/src/rev/14b71af12689
branches: trunk
changeset: 342649:14b71af12689
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sun Jan 03 15:26:39 2016 +0000
description:
reorganize constant test data
diffstat:
tests/lib/libusbhid/t_usbhid.c | 64 +++++++++++++++++++++---------------------
1 files changed, 32 insertions(+), 32 deletions(-)
diffs (110 lines):
diff -r ee6937046084 -r 14b71af12689 tests/lib/libusbhid/t_usbhid.c
--- a/tests/lib/libusbhid/t_usbhid.c Sun Jan 03 15:25:31 2016 +0000
+++ b/tests/lib/libusbhid/t_usbhid.c Sun Jan 03 15:26:39 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_usbhid.c,v 1.7 2016/01/03 15:16:10 jakllsch Exp $ */
+/* $NetBSD: t_usbhid.c,v 1.8 2016/01/03 15:26:39 jakllsch Exp $ */
/*
* Copyright (c) 2016 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_usbhid.c,v 1.7 2016/01/03 15:16:10 jakllsch Exp $");
+__RCSID("$NetBSD: t_usbhid.c,v 1.8 2016/01/03 15:26:39 jakllsch Exp $");
#include <atf-c.h>
@@ -84,6 +84,30 @@
0x81, 0x00, // Input
};
+static const uint8_t range_test_minimum_report[7] = {
+ 0x00, 0x00, 0x00, 0x80,
+ 0x00, 0x80,
+ 0x80,
+};
+
+static const uint8_t range_test_negative_one_report[7] = {
+ 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff,
+ 0xff,
+};
+
+static const uint8_t range_test_positive_one_report[7] = {
+ 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00,
+ 0x01,
+};
+
+static const uint8_t range_test_maximum_report[7] = {
+ 0xff, 0xff, 0xff, 0x7f,
+ 0xff, 0x7f,
+ 0x7f,
+};
+
static const uint8_t unsigned_range_test_report_descriptor[] = {
0x0b, 0x13, 0x00, 0x00, 0xff, // Usage
0x75, 0x20, // Report Size
@@ -113,54 +137,30 @@
0x81, 0x00, // Input
};
-static const uint8_t range_test_minimum_report[7] = {
- 0x00, 0x00, 0x00, 0x80,
- 0x00, 0x80,
- 0x80,
-};
-
static const uint8_t unsigned_range_test_minimum_report[7] = {
0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00,
};
-static const uint8_t range_test_maximum_report[7] = {
- 0xff, 0xff, 0xff, 0x7f,
- 0xff, 0x7f,
- 0x7f,
-};
-
-static const uint8_t unsigned_range_test_maximum_report[7] = {
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff,
- 0xff,
-};
-
-static const uint8_t range_test_positive_one_report[7] = {
- 0x01, 0x00, 0x00, 0x00,
- 0x01, 0x00,
- 0x01,
-};
-
static const uint8_t unsigned_range_test_positive_one_report[7] = {
0x01, 0x00, 0x00, 0x00,
0x01, 0x00,
0x01,
};
-static const uint8_t range_test_negative_one_report[7] = {
- 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff,
- 0xff,
-};
-
static const uint8_t unsigned_range_test_negative_one_report[7] = {
0xfe, 0xff, 0xff, 0xff,
0xfe, 0xff,
0xfe,
};
+static const uint8_t unsigned_range_test_maximum_report[7] = {
+ 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff,
+ 0xff,
+};
+
ATF_TC_HEAD(check_hid_usage, tc)
{
Home |
Main Index |
Thread Index |
Old Index