From 2ec9389a0dea376c6aedd15c2703868fa26f0644 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 12 Mar 2025 10:27:08 +1000 Subject: [PATCH] test: stringify the LITEST_ value as the device's name This avoids inconsistencies between the LITEST_ enum value and the shortname but also makes it easier to grep for any test cases that use the same define. At the cost of the test names not looking very nice anymore but oh well. Part-of: --- test/litest-device-absinfo-override.c | 3 +-- test/litest-device-acer-hawaii-keyboard.c | 3 +-- test/litest-device-acer-hawaii-touchpad.c | 3 +-- test/litest-device-aiptek-tablet.c | 3 +-- test/litest-device-alps-3fg.c | 3 +-- test/litest-device-alps-dualpoint.c | 3 +-- test/litest-device-alps-semi-mt.c | 3 +-- test/litest-device-anker-mouse-kbd.c | 3 +-- test/litest-device-apple-appletouch.c | 3 +-- test/litest-device-apple-internal-keyboard.c | 3 +-- test/litest-device-apple-magicmouse.c | 3 +-- test/litest-device-asus-rog-gladius.c | 3 +-- test/litest-device-atmel-hover.c | 3 +-- test/litest-device-bcm5974.c | 3 +-- test/litest-device-calibrated-touchscreen.c | 3 +-- test/litest-device-cyborg-rat-5.c | 3 +-- test/litest-device-dell-canvas-totem-touch.c | 3 +-- test/litest-device-dell-canvas-totem.c | 3 +-- test/litest-device-elan-tablet.c | 3 +-- test/litest-device-elantech-touchpad.c | 3 +-- test/litest-device-format-string.c | 3 +-- test/litest-device-generic-pressurepad.c | 3 +-- test/litest-device-generic-singletouch.c | 3 +-- test/litest-device-gpio-keys.c | 3 +-- test/litest-device-hp-wmi-hotkeys.c | 3 +-- test/litest-device-huion-pentablet.c | 3 +-- test/litest-device-huion-q620m-dial.c | 3 +-- test/litest-device-ignored-mouse.c | 3 +-- test/litest-device-keyboard-all-codes.c | 3 +-- test/litest-device-keyboard-quirked.c | 3 +-- test/litest-device-keyboard-razer-blackwidow.c | 3 +-- ...itest-device-keyboard-razer-blade-stealth-videoswitch.c | 3 +-- test/litest-device-keyboard-razer-blade-stealth.c | 3 +-- test/litest-device-keyboard.c | 3 +-- test/litest-device-lenovo-scrollpoint.c | 3 +-- test/litest-device-lid-switch-surface3.c | 3 +-- test/litest-device-lid-switch.c | 3 +-- test/litest-device-logitech-media-keyboard-elite.c | 3 +-- test/litest-device-logitech-trackball.c | 3 +-- test/litest-device-magic-trackpad.c | 3 +-- test/litest-device-mouse-low-dpi.c | 3 +-- test/litest-device-mouse-roccat.c | 3 +-- test/litest-device-mouse-wheel-click-angle.c | 3 +-- test/litest-device-mouse-wheel-click-count.c | 3 +-- test/litest-device-mouse-wheel-tilt.c | 3 +-- test/litest-device-mouse.c | 3 +-- test/litest-device-ms-nano-transceiver-mouse.c | 3 +-- test/litest-device-ms-surface-cover.c | 3 +-- test/litest-device-nexus4-touch-screen.c | 3 +-- test/litest-device-protocol-a-touch-screen.c | 3 +-- test/litest-device-qemu-usb-tablet.c | 3 +-- test/litest-device-sony-vaio-keys.c | 3 +-- test/litest-device-synaptics-hover.c | 3 +-- test/litest-device-synaptics-i2c.c | 3 +-- test/litest-device-synaptics-phantomclicks.c | 3 +-- test/litest-device-synaptics-pressurepad.c | 3 +-- test/litest-device-synaptics-rmi4.c | 3 +-- test/litest-device-synaptics-st.c | 3 +-- test/litest-device-synaptics-t440.c | 3 +-- test/litest-device-synaptics-x1-carbon-3rd.c | 3 +-- test/litest-device-synaptics-x220.c | 3 +-- test/litest-device-tablet-doubledial.c | 3 +-- test/litest-device-tablet-mode-switch.c | 3 +-- test/litest-device-tablet-rel-dial.c | 3 +-- test/litest-device-thinkpad-extrabuttons.c | 3 +-- test/litest-device-touch-screen.c | 3 +-- test/litest-device-touchpad-palm-threshold-zero.c | 3 +-- test/litest-device-touchscreen-fuzz.c | 3 +-- test/litest-device-touchscreen-invalid-range.c | 3 +-- test/litest-device-touchscreen-mt-tool.c | 3 +-- test/litest-device-trackpoint.c | 3 +-- test/litest-device-uclogic-tablet.c | 3 +-- test/litest-device-vmware-virtual-usb-mouse.c | 3 +-- test/litest-device-wacom-bamboo-16fg-pen.c | 3 +-- test/litest-device-wacom-bamboo-2fg-finger.c | 3 +-- test/litest-device-wacom-bamboo-2fg-pad.c | 3 +-- test/litest-device-wacom-bamboo-2fg-pen.c | 3 +-- test/litest-device-wacom-calibrated-tablet.c | 3 +-- test/litest-device-wacom-cintiq-12wx-pen.c | 3 +-- test/litest-device-wacom-cintiq-13hdt-finger.c | 3 +-- test/litest-device-wacom-cintiq-13hdt-pad.c | 3 +-- test/litest-device-wacom-cintiq-13hdt-pen.c | 3 +-- test/litest-device-wacom-cintiq-24hd-pen.c | 3 +-- test/litest-device-wacom-cintiq-24hdt-pad.c | 3 +-- test/litest-device-wacom-cintiq-pro-16-finger.c | 3 +-- test/litest-device-wacom-cintiq-pro-16-pad.c | 3 +-- test/litest-device-wacom-cintiq-pro-16-pen.c | 3 +-- test/litest-device-wacom-ekr.c | 3 +-- test/litest-device-wacom-hid4800-pen.c | 3 +-- test/litest-device-wacom-intuos3-pad.c | 3 +-- test/litest-device-wacom-intuos5-finger.c | 3 +-- test/litest-device-wacom-intuos5-pad.c | 3 +-- test/litest-device-wacom-intuos5-pen.c | 3 +-- test/litest-device-wacom-isdv4-4200-pen.c | 3 +-- test/litest-device-wacom-isdv4-524c-pen.c | 3 +-- test/litest-device-wacom-isdv4-e6-finger.c | 3 +-- test/litest-device-wacom-isdv4-e6-pen.c | 3 +-- test/litest-device-wacom-mobilestudio-pro-pad.c | 3 +-- test/litest-device-waltop-tablet.c | 3 +-- test/litest-device-wheel-only.c | 3 +-- test/litest-device-xen-virtual-pointer.c | 3 +-- test/litest-device-yubikey.c | 3 +-- test/litest.h | 7 ++++--- 103 files changed, 106 insertions(+), 207 deletions(-) diff --git a/test/litest-device-absinfo-override.c b/test/litest-device-absinfo-override.c index ce8586e4..04c45c31 100644 --- a/test/litest-device-absinfo-override.c +++ b/test/litest-device-absinfo-override.c @@ -58,8 +58,7 @@ static struct input_absinfo absinfo[] = { /* This device only exists to verify that the EVDEV_ABS override bits work * correctly */ -TEST_DEVICE("absinfo-override", - .type = LITEST_ABSINFO_OVERRIDE, +TEST_DEVICE(LITEST_ABSINFO_OVERRIDE, .features = LITEST_IGNORED, .interface = NULL, diff --git a/test/litest-device-acer-hawaii-keyboard.c b/test/litest-device-acer-hawaii-keyboard.c index 040a26a9..b0a830a7 100644 --- a/test/litest-device-acer-hawaii-keyboard.c +++ b/test/litest-device-acer-hawaii-keyboard.c @@ -188,8 +188,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("hawaii-keyboard", - .type = LITEST_ACER_HAWAII_KEYBOARD, +TEST_DEVICE(LITEST_ACER_HAWAII_KEYBOARD, .features = LITEST_KEYS, .interface = NULL, diff --git a/test/litest-device-acer-hawaii-touchpad.c b/test/litest-device-acer-hawaii-touchpad.c index 366c3818..d651bfe7 100644 --- a/test/litest-device-acer-hawaii-touchpad.c +++ b/test/litest-device-acer-hawaii-touchpad.c @@ -81,8 +81,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; -TEST_DEVICE("hawaii-touchpad", - .type = LITEST_ACER_HAWAII_TOUCHPAD, +TEST_DEVICE(LITEST_ACER_HAWAII_TOUCHPAD, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON, .interface = &interface, diff --git a/test/litest-device-aiptek-tablet.c b/test/litest-device-aiptek-tablet.c index 470ba605..5ceb3a9b 100644 --- a/test/litest-device-aiptek-tablet.c +++ b/test/litest-device-aiptek-tablet.c @@ -146,8 +146,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("aiptek-tablet", - .type = LITEST_AIPTEK, +TEST_DEVICE(LITEST_AIPTEK, .features = LITEST_TABLET | LITEST_HOVER | LITEST_FORCED_PROXOUT, .interface = &interface, diff --git a/test/litest-device-alps-3fg.c b/test/litest-device-alps-3fg.c index 16a11ee1..8aa0cc6f 100644 --- a/test/litest-device-alps-3fg.c +++ b/test/litest-device-alps-3fg.c @@ -166,8 +166,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; -TEST_DEVICE("alps-3fg", - .type = LITEST_ALPS_3FG, +TEST_DEVICE(LITEST_ALPS_3FG, .features = LITEST_TOUCHPAD | LITEST_BUTTON, .interface = &interface, diff --git a/test/litest-device-alps-dualpoint.c b/test/litest-device-alps-dualpoint.c index 57008f61..9e6a575d 100644 --- a/test/litest-device-alps-dualpoint.c +++ b/test/litest-device-alps-dualpoint.c @@ -109,8 +109,7 @@ static const char quirk_file[] = "MatchName=litest AlpsPS/2 ALPS DualPoint TouchPad\n" "ModelTouchpadVisibleMarker=1\n"; -TEST_DEVICE("alps-dualpoint", - .type = LITEST_ALPS_DUALPOINT, +TEST_DEVICE(LITEST_ALPS_DUALPOINT, .features = LITEST_TOUCHPAD | LITEST_BUTTON | LITEST_SEMI_MT, .interface = &interface, diff --git a/test/litest-device-alps-semi-mt.c b/test/litest-device-alps-semi-mt.c index 59aac969..b8de1044 100644 --- a/test/litest-device-alps-semi-mt.c +++ b/test/litest-device-alps-semi-mt.c @@ -103,8 +103,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; -TEST_DEVICE("alps-semi-mt", - .type = LITEST_ALPS_SEMI_MT, +TEST_DEVICE(LITEST_ALPS_SEMI_MT, .features = LITEST_TOUCHPAD | LITEST_BUTTON | LITEST_SEMI_MT, .interface = &interface, diff --git a/test/litest-device-anker-mouse-kbd.c b/test/litest-device-anker-mouse-kbd.c index 1e315e3e..f0511f19 100644 --- a/test/litest-device-anker-mouse-kbd.c +++ b/test/litest-device-anker-mouse-kbd.c @@ -206,8 +206,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 }, }; -TEST_DEVICE("anker-kbd", - .type = LITEST_ANKER_MOUSE_KBD, +TEST_DEVICE(LITEST_ANKER_MOUSE_KBD, .features = LITEST_KEYS | LITEST_WHEEL, .interface = NULL, diff --git a/test/litest-device-apple-appletouch.c b/test/litest-device-apple-appletouch.c index 26f94fc5..b85c9c0f 100644 --- a/test/litest-device-apple-appletouch.c +++ b/test/litest-device-apple-appletouch.c @@ -88,8 +88,7 @@ static const char quirk_file[] = "MatchName=litest appletouch\n" "ModelAppleTouchpadOneButton=1\n"; -TEST_DEVICE("appletouch", - .type = LITEST_APPLETOUCH, +TEST_DEVICE(LITEST_APPLETOUCH, .features = LITEST_TOUCHPAD | LITEST_BUTTON | LITEST_SINGLE_TOUCH, .interface = &interface, diff --git a/test/litest-device-apple-internal-keyboard.c b/test/litest-device-apple-internal-keyboard.c index ca1159e8..4118e703 100644 --- a/test/litest-device-apple-internal-keyboard.c +++ b/test/litest-device-apple-internal-keyboard.c @@ -217,8 +217,7 @@ static int events[] = { -1, -1 }; -TEST_DEVICE("apple-keyboard", - .type = LITEST_APPLE_KEYBOARD, +TEST_DEVICE(LITEST_APPLE_KEYBOARD, .features = LITEST_KEYS, .interface = NULL, diff --git a/test/litest-device-apple-magicmouse.c b/test/litest-device-apple-magicmouse.c index 5cc5865b..a3ce10c3 100644 --- a/test/litest-device-apple-magicmouse.c +++ b/test/litest-device-apple-magicmouse.c @@ -82,8 +82,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; -TEST_DEVICE("magicmouse", - .type = LITEST_MAGICMOUSE, +TEST_DEVICE(LITEST_MAGICMOUSE, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, .interface = &interface, diff --git a/test/litest-device-asus-rog-gladius.c b/test/litest-device-asus-rog-gladius.c index 2617713d..18459389 100644 --- a/test/litest-device-asus-rog-gladius.c +++ b/test/litest-device-asus-rog-gladius.c @@ -312,8 +312,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; -TEST_DEVICE("mouse-gladius", - .type = LITEST_MOUSE_GLADIUS, +TEST_DEVICE(LITEST_MOUSE_GLADIUS, .features = LITEST_RELATIVE | LITEST_WHEEL | LITEST_KEYS, .interface = NULL, diff --git a/test/litest-device-atmel-hover.c b/test/litest-device-atmel-hover.c index f94bd535..52137480 100644 --- a/test/litest-device-atmel-hover.c +++ b/test/litest-device-atmel-hover.c @@ -121,8 +121,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; -TEST_DEVICE("atmel-hover", - .type = LITEST_ATMEL_HOVER, +TEST_DEVICE(LITEST_ATMEL_HOVER, .features = LITEST_TOUCHPAD | LITEST_BUTTON | LITEST_CLICKPAD | LITEST_HOVER, .interface = &interface, diff --git a/test/litest-device-bcm5974.c b/test/litest-device-bcm5974.c index 0a3002f6..030a45f7 100644 --- a/test/litest-device-bcm5974.c +++ b/test/litest-device-bcm5974.c @@ -115,8 +115,7 @@ static int events[] = { -1, -1 }; -TEST_DEVICE("bcm5974", - .type = LITEST_BCM5974, +TEST_DEVICE(LITEST_BCM5974, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON | LITEST_APPLE_CLICKPAD, .interface = &interface, diff --git a/test/litest-device-calibrated-touchscreen.c b/test/litest-device-calibrated-touchscreen.c index ef4903e2..d68c136a 100644 --- a/test/litest-device-calibrated-touchscreen.c +++ b/test/litest-device-calibrated-touchscreen.c @@ -70,8 +70,7 @@ static int events[] = { -1, -1 }; -TEST_DEVICE("calibrated-touchscreen", - .type = LITEST_CALIBRATED_TOUCHSCREEN, +TEST_DEVICE(LITEST_CALIBRATED_TOUCHSCREEN, .features = LITEST_TOUCH|LITEST_PRECALIBRATED, .interface = &interface, diff --git a/test/litest-device-cyborg-rat-5.c b/test/litest-device-cyborg-rat-5.c index 9fd09789..93cfc1c5 100644 --- a/test/litest-device-cyborg-rat-5.c +++ b/test/litest-device-cyborg-rat-5.c @@ -49,8 +49,7 @@ static int events[] = { -1 , -1, }; -TEST_DEVICE("cyborg-rat", - .type = LITEST_CYBORG_RAT, +TEST_DEVICE(LITEST_CYBORG_RAT, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, .interface = NULL, diff --git a/test/litest-device-dell-canvas-totem-touch.c b/test/litest-device-dell-canvas-totem-touch.c index ba5009f3..b68ebf8f 100644 --- a/test/litest-device-dell-canvas-totem-touch.c +++ b/test/litest-device-dell-canvas-totem-touch.c @@ -76,8 +76,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("dell-canvas-totem-touch", - .type = LITEST_DELL_CANVAS_TOTEM_TOUCH, +TEST_DEVICE(LITEST_DELL_CANVAS_TOTEM_TOUCH, .features = LITEST_TOUCH, .interface = &interface, diff --git a/test/litest-device-dell-canvas-totem.c b/test/litest-device-dell-canvas-totem.c index 74cb73dd..20c96d99 100644 --- a/test/litest-device-dell-canvas-totem.c +++ b/test/litest-device-dell-canvas-totem.c @@ -107,8 +107,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("dell-canvas-totem", - .type = LITEST_DELL_CANVAS_TOTEM, +TEST_DEVICE(LITEST_DELL_CANVAS_TOTEM, .features = LITEST_TOTEM | LITEST_TABLET, .interface = &interface, diff --git a/test/litest-device-elan-tablet.c b/test/litest-device-elan-tablet.c index 8ad78f01..cd93b619 100644 --- a/test/litest-device-elan-tablet.c +++ b/test/litest-device-elan-tablet.c @@ -134,8 +134,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("elan-tablet", - .type = LITEST_ELAN_TABLET, +TEST_DEVICE(LITEST_ELAN_TABLET, .features = LITEST_TABLET, .interface = &interface, diff --git a/test/litest-device-elantech-touchpad.c b/test/litest-device-elantech-touchpad.c index ab87f105..19dff009 100644 --- a/test/litest-device-elantech-touchpad.c +++ b/test/litest-device-elantech-touchpad.c @@ -98,8 +98,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; -TEST_DEVICE("elantech", - .type = LITEST_ELANTECH_TOUCHPAD, +TEST_DEVICE(LITEST_ELANTECH_TOUCHPAD, .features = LITEST_TOUCHPAD | LITEST_BUTTON, .interface = &interface, diff --git a/test/litest-device-format-string.c b/test/litest-device-format-string.c index aed15db4..d9f72855 100644 --- a/test/litest-device-format-string.c +++ b/test/litest-device-format-string.c @@ -44,8 +44,7 @@ static int events[] = { -1 , -1, }; -TEST_DEVICE("mouse-format-string", - .type = LITEST_MOUSE_FORMAT_STRING, +TEST_DEVICE(LITEST_MOUSE_FORMAT_STRING, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, .interface = NULL, diff --git a/test/litest-device-generic-pressurepad.c b/test/litest-device-generic-pressurepad.c index a7cd5f3a..c83f1be1 100644 --- a/test/litest-device-generic-pressurepad.c +++ b/test/litest-device-generic-pressurepad.c @@ -112,8 +112,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; -TEST_DEVICE("generic-pressurepad", - .type = LITEST_GENERIC_PRESSUREPAD, +TEST_DEVICE(LITEST_GENERIC_PRESSUREPAD, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON, .interface = &interface, diff --git a/test/litest-device-generic-singletouch.c b/test/litest-device-generic-singletouch.c index 306fd73d..c61a4220 100644 --- a/test/litest-device-generic-singletouch.c +++ b/test/litest-device-generic-singletouch.c @@ -65,8 +65,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("generic-singletouch", - .type = LITEST_GENERIC_SINGLETOUCH, +TEST_DEVICE(LITEST_GENERIC_SINGLETOUCH, .features = LITEST_SINGLE_TOUCH, .interface = &interface, diff --git a/test/litest-device-gpio-keys.c b/test/litest-device-gpio-keys.c index 92145e97..51d9fa5f 100644 --- a/test/litest-device-gpio-keys.c +++ b/test/litest-device-gpio-keys.c @@ -47,8 +47,7 @@ static const char quirk_file[] = "MatchName=litest gpio-keys\n" "AttrLidSwitchReliability=reliable\n"; -TEST_DEVICE("gpio-keys", - .type = LITEST_GPIO_KEYS, +TEST_DEVICE(LITEST_GPIO_KEYS, .features = LITEST_SWITCH, .interface = NULL, diff --git a/test/litest-device-hp-wmi-hotkeys.c b/test/litest-device-hp-wmi-hotkeys.c index 025fda72..ee69c581 100644 --- a/test/litest-device-hp-wmi-hotkeys.c +++ b/test/litest-device-hp-wmi-hotkeys.c @@ -47,8 +47,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wmi-hotkeys", - .type = LITEST_HP_WMI_HOTKEYS, +TEST_DEVICE(LITEST_HP_WMI_HOTKEYS, .features = LITEST_SWITCH, .interface = NULL, diff --git a/test/litest-device-huion-pentablet.c b/test/litest-device-huion-pentablet.c index 8e529f62..f098dbc6 100644 --- a/test/litest-device-huion-pentablet.c +++ b/test/litest-device-huion-pentablet.c @@ -96,8 +96,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("huion-tablet", - .type = LITEST_HUION_TABLET, +TEST_DEVICE(LITEST_HUION_TABLET, .features = LITEST_TABLET | LITEST_HOVER | LITEST_FORCED_PROXOUT, .interface = &interface, diff --git a/test/litest-device-huion-q620m-dial.c b/test/litest-device-huion-q620m-dial.c index 11fbfaac..13568f15 100644 --- a/test/litest-device-huion-q620m-dial.c +++ b/test/litest-device-huion-q620m-dial.c @@ -61,8 +61,7 @@ static int events[] = { }; /* Device from https://gitlab.freedesktop.org/libinput/libinput/-/issues/600 */ -TEST_DEVICE("huion-q620m-dial-pad", - .type = LITEST_HUION_Q620M_DIAL, +TEST_DEVICE(LITEST_HUION_Q620M_DIAL, .features = LITEST_TABLET_PAD | LITEST_DIAL, .interface = &interface, diff --git a/test/litest-device-ignored-mouse.c b/test/litest-device-ignored-mouse.c index b3846163..142eaa9d 100644 --- a/test/litest-device-ignored-mouse.c +++ b/test/litest-device-ignored-mouse.c @@ -42,8 +42,7 @@ static int events[] = { -1 , -1, }; -TEST_DEVICE("ignored-mouse", - .type = LITEST_IGNORED_MOUSE, +TEST_DEVICE(LITEST_IGNORED_MOUSE, .features = LITEST_IGNORED | LITEST_BUTTON | LITEST_RELATIVE, .interface = NULL, diff --git a/test/litest-device-keyboard-all-codes.c b/test/litest-device-keyboard-all-codes.c index 5f18311c..09168c6f 100644 --- a/test/litest-device-keyboard-all-codes.c +++ b/test/litest-device-keyboard-all-codes.c @@ -36,8 +36,7 @@ static struct input_id input_id = { .product = 0x1, }; -TEST_DEVICE("keyboard-all-codes", - .type = LITEST_KEYBOARD_ALL_CODES, +TEST_DEVICE(LITEST_KEYBOARD_ALL_CODES, .features = LITEST_KEYS, .interface = NULL, .create = all_codes_create, diff --git a/test/litest-device-keyboard-quirked.c b/test/litest-device-keyboard-quirked.c index 914238a9..340dc137 100644 --- a/test/litest-device-keyboard-quirked.c +++ b/test/litest-device-keyboard-quirked.c @@ -242,8 +242,7 @@ static const char quirk_file[] = #endif ; -TEST_DEVICE("keyboard-quirked", - .type = LITEST_KEYBOARD_QUIRKED, +TEST_DEVICE(LITEST_KEYBOARD_QUIRKED, .features = LITEST_KEYS | LITEST_IGNORED, /* Only use this keyboard in specific tests */ .interface = NULL, diff --git a/test/litest-device-keyboard-razer-blackwidow.c b/test/litest-device-keyboard-razer-blackwidow.c index 5585ea46..c8613e3d 100644 --- a/test/litest-device-keyboard-razer-blackwidow.c +++ b/test/litest-device-keyboard-razer-blackwidow.c @@ -332,8 +332,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 }, }; -TEST_DEVICE("blackwidow", - .type = LITEST_KEYBOARD_BLACKWIDOW, +TEST_DEVICE(LITEST_KEYBOARD_BLACKWIDOW, .features = LITEST_KEYS | LITEST_WHEEL, .interface = NULL, diff --git a/test/litest-device-keyboard-razer-blade-stealth-videoswitch.c b/test/litest-device-keyboard-razer-blade-stealth-videoswitch.c index 0f12d854..5115d5ca 100644 --- a/test/litest-device-keyboard-razer-blade-stealth-videoswitch.c +++ b/test/litest-device-keyboard-razer-blade-stealth-videoswitch.c @@ -207,8 +207,7 @@ static int events[] = { -1 , -1, }; -TEST_DEVICE("blade-stealth-video-switch", - .type = LITEST_KEYBOARD_BLADE_STEALTH_VIDEOSWITCH, +TEST_DEVICE(LITEST_KEYBOARD_BLADE_STEALTH_VIDEOSWITCH, .features = LITEST_KEYS, .interface = NULL, diff --git a/test/litest-device-keyboard-razer-blade-stealth.c b/test/litest-device-keyboard-razer-blade-stealth.c index b27af149..6000d8c4 100644 --- a/test/litest-device-keyboard-razer-blade-stealth.c +++ b/test/litest-device-keyboard-razer-blade-stealth.c @@ -330,8 +330,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 }, }; -TEST_DEVICE("blade-stealth", - .type = LITEST_KEYBOARD_BLADE_STEALTH, +TEST_DEVICE(LITEST_KEYBOARD_BLADE_STEALTH, .features = LITEST_KEYS | LITEST_WHEEL, .interface = NULL, diff --git a/test/litest-device-keyboard.c b/test/litest-device-keyboard.c index 6f6c6260..828ec1e5 100644 --- a/test/litest-device-keyboard.c +++ b/test/litest-device-keyboard.c @@ -191,8 +191,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("default-keyboard", - .type = LITEST_KEYBOARD, +TEST_DEVICE(LITEST_KEYBOARD, .features = LITEST_KEYS, .interface = NULL, diff --git a/test/litest-device-lenovo-scrollpoint.c b/test/litest-device-lenovo-scrollpoint.c index a61db926..ae64f54f 100644 --- a/test/litest-device-lenovo-scrollpoint.c +++ b/test/litest-device-lenovo-scrollpoint.c @@ -48,8 +48,7 @@ static int events[] = { * "standard" wheel tests. Device has a custom wheel * behavior that is tested directly. */ -TEST_DEVICE("lenovo-scrollpoint", - .type = LITEST_LENOVO_SCROLLPOINT, +TEST_DEVICE(LITEST_LENOVO_SCROLLPOINT, .features = LITEST_RELATIVE | LITEST_BUTTON, .interface = NULL, diff --git a/test/litest-device-lid-switch-surface3.c b/test/litest-device-lid-switch-surface3.c index 5e913d91..b59090dc 100644 --- a/test/litest-device-lid-switch-surface3.c +++ b/test/litest-device-lid-switch-surface3.c @@ -43,8 +43,7 @@ static const char quirk_file[] = "MatchName=litest Lid Switch Surface3\n" "AttrLidSwitchReliability=write_open\n"; -TEST_DEVICE("lid-switch-surface3", - .type = LITEST_LID_SWITCH_SURFACE3, +TEST_DEVICE(LITEST_LID_SWITCH_SURFACE3, .features = LITEST_SWITCH, .interface = NULL, diff --git a/test/litest-device-lid-switch.c b/test/litest-device-lid-switch.c index 9f3a8690..00b8d805 100644 --- a/test/litest-device-lid-switch.c +++ b/test/litest-device-lid-switch.c @@ -42,8 +42,7 @@ static const char quirk_file[] = "MatchName=litest Lid Switch\n" "AttrLidSwitchReliability=reliable\n"; -TEST_DEVICE("lid-switch", - .type = LITEST_LID_SWITCH, +TEST_DEVICE(LITEST_LID_SWITCH, .features = LITEST_SWITCH, .interface = NULL, diff --git a/test/litest-device-logitech-media-keyboard-elite.c b/test/litest-device-logitech-media-keyboard-elite.c index cac921ba..889879d5 100644 --- a/test/litest-device-logitech-media-keyboard-elite.c +++ b/test/litest-device-logitech-media-keyboard-elite.c @@ -80,8 +80,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("logitech-media-keyboard-elite", - .type = LITEST_KEYBOARD_LOGITECH_MEDIA_KEYBOARD_ELITE, +TEST_DEVICE(LITEST_KEYBOARD_LOGITECH_MEDIA_KEYBOARD_ELITE, .features = LITEST_KEYS, .interface = NULL, diff --git a/test/litest-device-logitech-trackball.c b/test/litest-device-logitech-trackball.c index 747b66cf..9bebfd49 100644 --- a/test/litest-device-logitech-trackball.c +++ b/test/litest-device-logitech-trackball.c @@ -43,8 +43,7 @@ static int events[] = { -1 , -1, }; -TEST_DEVICE("logitech-trackball", - .type = LITEST_LOGITECH_TRACKBALL, +TEST_DEVICE(LITEST_LOGITECH_TRACKBALL, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_TRACKBALL, .interface = NULL, diff --git a/test/litest-device-magic-trackpad.c b/test/litest-device-magic-trackpad.c index 8dfde8bc..3f68c524 100644 --- a/test/litest-device-magic-trackpad.c +++ b/test/litest-device-magic-trackpad.c @@ -105,8 +105,7 @@ static int events[] = { -1, -1 }; -TEST_DEVICE("magic-trackpad", - .type = LITEST_MAGIC_TRACKPAD, +TEST_DEVICE(LITEST_MAGIC_TRACKPAD, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON | LITEST_APPLE_CLICKPAD, .interface = &interface, diff --git a/test/litest-device-mouse-low-dpi.c b/test/litest-device-mouse-low-dpi.c index a01b89f1..616e427b 100644 --- a/test/litest-device-mouse-low-dpi.c +++ b/test/litest-device-mouse-low-dpi.c @@ -45,8 +45,7 @@ static int events[] = { -1 , -1, }; -TEST_DEVICE("low-dpi-mouse", - .type = LITEST_MOUSE_LOW_DPI, +TEST_DEVICE(LITEST_MOUSE_LOW_DPI, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, .interface = NULL, diff --git a/test/litest-device-mouse-roccat.c b/test/litest-device-mouse-roccat.c index c7d41cef..8ee1adbb 100644 --- a/test/litest-device-mouse-roccat.c +++ b/test/litest-device-mouse-roccat.c @@ -184,8 +184,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; -TEST_DEVICE("mouse-roccat", - .type = LITEST_MOUSE_ROCCAT, +TEST_DEVICE(LITEST_MOUSE_ROCCAT, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL | LITEST_KEYS, .interface = NULL, diff --git a/test/litest-device-mouse-wheel-click-angle.c b/test/litest-device-mouse-wheel-click-angle.c index 0f6f51ab..71ddec72 100644 --- a/test/litest-device-mouse-wheel-click-angle.c +++ b/test/litest-device-mouse-wheel-click-angle.c @@ -42,8 +42,7 @@ static int events[] = { -1 , -1, }; -TEST_DEVICE("mouse-wheelclickangle", - .type = LITEST_MOUSE_WHEEL_CLICK_ANGLE, +TEST_DEVICE(LITEST_MOUSE_WHEEL_CLICK_ANGLE, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, .interface = NULL, diff --git a/test/litest-device-mouse-wheel-click-count.c b/test/litest-device-mouse-wheel-click-count.c index f9a0931a..24ee48e0 100644 --- a/test/litest-device-mouse-wheel-click-count.c +++ b/test/litest-device-mouse-wheel-click-count.c @@ -42,8 +42,7 @@ static int events[] = { -1 , -1, }; -TEST_DEVICE("mouse-wheelclickcount", - .type = LITEST_MOUSE_WHEEL_CLICK_COUNT, +TEST_DEVICE(LITEST_MOUSE_WHEEL_CLICK_COUNT, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, .interface = NULL, diff --git a/test/litest-device-mouse-wheel-tilt.c b/test/litest-device-mouse-wheel-tilt.c index 38a6c48f..ae8a51c6 100644 --- a/test/litest-device-mouse-wheel-tilt.c +++ b/test/litest-device-mouse-wheel-tilt.c @@ -43,8 +43,7 @@ static int events[] = { -1 , -1, }; -TEST_DEVICE("mouse-wheel-tilt", - .type = LITEST_MOUSE_WHEEL_TILT, +TEST_DEVICE(LITEST_MOUSE_WHEEL_TILT, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, .interface = NULL, diff --git a/test/litest-device-mouse.c b/test/litest-device-mouse.c index d2c02fa3..3b456177 100644 --- a/test/litest-device-mouse.c +++ b/test/litest-device-mouse.c @@ -43,8 +43,7 @@ static int events[] = { -1 , -1, }; -TEST_DEVICE("mouse", - .type = LITEST_MOUSE, +TEST_DEVICE(LITEST_MOUSE, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, .interface = NULL, diff --git a/test/litest-device-ms-nano-transceiver-mouse.c b/test/litest-device-ms-nano-transceiver-mouse.c index d481cb72..5beac75b 100644 --- a/test/litest-device-ms-nano-transceiver-mouse.c +++ b/test/litest-device-ms-nano-transceiver-mouse.c @@ -46,8 +46,7 @@ static int events[] = { -1 , -1, }; -TEST_DEVICE("ms-nano-mouse", - .type = LITEST_MS_NANO_TRANSCEIVER_MOUSE, +TEST_DEVICE(LITEST_MS_NANO_TRANSCEIVER_MOUSE, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL | LITEST_NO_DEBOUNCE, .interface = NULL, diff --git a/test/litest-device-ms-surface-cover.c b/test/litest-device-ms-surface-cover.c index 77306fb5..0f2a1490 100644 --- a/test/litest-device-ms-surface-cover.c +++ b/test/litest-device-ms-surface-cover.c @@ -370,8 +370,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("ms-surface-cover", - .type = LITEST_MS_SURFACE_COVER, +TEST_DEVICE(LITEST_MS_SURFACE_COVER, .features = LITEST_KEYS | LITEST_ABSOLUTE | LITEST_RELATIVE | LITEST_FAKE_MT | LITEST_BUTTON | LITEST_WHEEL, .interface = &interface, diff --git a/test/litest-device-nexus4-touch-screen.c b/test/litest-device-nexus4-touch-screen.c index 9e70aa29..66693095 100644 --- a/test/litest-device-nexus4-touch-screen.c +++ b/test/litest-device-nexus4-touch-screen.c @@ -76,8 +76,7 @@ static int events[] = { -1, -1 }; -TEST_DEVICE("nexus4", - .type = LITEST_NEXUS4_TOUCH_SCREEN, +TEST_DEVICE(LITEST_NEXUS4_TOUCH_SCREEN, .features = LITEST_TOUCH|LITEST_ELLIPSE, .interface = &interface, diff --git a/test/litest-device-protocol-a-touch-screen.c b/test/litest-device-protocol-a-touch-screen.c index b27b04c9..9889886b 100644 --- a/test/litest-device-protocol-a-touch-screen.c +++ b/test/litest-device-protocol-a-touch-screen.c @@ -201,8 +201,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("protocol-a", - .type = LITEST_PROTOCOL_A_SCREEN, +TEST_DEVICE(LITEST_PROTOCOL_A_SCREEN, .features = LITEST_PROTOCOL_A|LITEST_TOUCH, .create = protocolA_create, diff --git a/test/litest-device-qemu-usb-tablet.c b/test/litest-device-qemu-usb-tablet.c index f8ed1b94..b3fd39d9 100644 --- a/test/litest-device-qemu-usb-tablet.c +++ b/test/litest-device-qemu-usb-tablet.c @@ -86,8 +86,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("qemu-tablet", - .type = LITEST_QEMU_TABLET, +TEST_DEVICE(LITEST_QEMU_TABLET, .features = LITEST_WHEEL | LITEST_BUTTON | LITEST_ABSOLUTE, .interface = &interface, diff --git a/test/litest-device-sony-vaio-keys.c b/test/litest-device-sony-vaio-keys.c index 753d5c35..56ee63bc 100644 --- a/test/litest-device-sony-vaio-keys.c +++ b/test/litest-device-sony-vaio-keys.c @@ -86,8 +86,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("sony-vaio-keys", - .type = LITEST_SONY_VAIO_KEYS, +TEST_DEVICE(LITEST_SONY_VAIO_KEYS, .features = LITEST_KEYS, .interface = NULL, diff --git a/test/litest-device-synaptics-hover.c b/test/litest-device-synaptics-hover.c index 17529015..d0e059a0 100644 --- a/test/litest-device-synaptics-hover.c +++ b/test/litest-device-synaptics-hover.c @@ -102,8 +102,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; -TEST_DEVICE("synaptics-hover", - .type = LITEST_SYNAPTICS_HOVER_SEMI_MT, +TEST_DEVICE(LITEST_SYNAPTICS_HOVER_SEMI_MT, .features = LITEST_TOUCHPAD | LITEST_SEMI_MT | LITEST_BUTTON, .interface = &interface, diff --git a/test/litest-device-synaptics-i2c.c b/test/litest-device-synaptics-i2c.c index ce2d905b..bd01ba54 100644 --- a/test/litest-device-synaptics-i2c.c +++ b/test/litest-device-synaptics-i2c.c @@ -84,8 +84,7 @@ static const char quirk_file[] = "MatchName=litest DLL0704:01 06CB:76AD Touchpad\n" "ModelTouchpadVisibleMarker=1\n"; -TEST_DEVICE("synaptics-i2c", - .type = LITEST_SYNAPTICS_I2C, +TEST_DEVICE(LITEST_SYNAPTICS_I2C, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON, .interface = &interface, diff --git a/test/litest-device-synaptics-phantomclicks.c b/test/litest-device-synaptics-phantomclicks.c index 2f65270d..b625e125 100644 --- a/test/litest-device-synaptics-phantomclicks.c +++ b/test/litest-device-synaptics-phantomclicks.c @@ -88,8 +88,7 @@ static const char quirk_file[] = "ModelTouchpadVisibleMarker=0\n" "ModelTouchpadPhantomClicks=1\n"; -TEST_DEVICE("synaptics-phantomclicks", - .type = LITEST_SYNAPTICS_PHANTOMCLICKS, +TEST_DEVICE(LITEST_SYNAPTICS_PHANTOMCLICKS, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON, .interface = &interface, .name = "DELL097D:00 04F3:311C Touchpad", diff --git a/test/litest-device-synaptics-pressurepad.c b/test/litest-device-synaptics-pressurepad.c index 1c2eee49..757acb18 100644 --- a/test/litest-device-synaptics-pressurepad.c +++ b/test/litest-device-synaptics-pressurepad.c @@ -112,8 +112,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; -TEST_DEVICE("synaptics-pressurepad", - .type = LITEST_SYNAPTICS_PRESSUREPAD, +TEST_DEVICE(LITEST_SYNAPTICS_PRESSUREPAD, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON, .interface = &interface, diff --git a/test/litest-device-synaptics-rmi4.c b/test/litest-device-synaptics-rmi4.c index c44bb68a..5643765c 100644 --- a/test/litest-device-synaptics-rmi4.c +++ b/test/litest-device-synaptics-rmi4.c @@ -111,8 +111,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; -TEST_DEVICE("synaptics-rmi4", - .type = LITEST_SYNAPTICS_RMI4, +TEST_DEVICE(LITEST_SYNAPTICS_RMI4, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON, .interface = &interface, diff --git a/test/litest-device-synaptics-st.c b/test/litest-device-synaptics-st.c index 98fe0174..2bb944f6 100644 --- a/test/litest-device-synaptics-st.c +++ b/test/litest-device-synaptics-st.c @@ -88,8 +88,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("synaptics-st", - .type = LITEST_SYNAPTICS_TOUCHPAD, +TEST_DEVICE(LITEST_SYNAPTICS_TOUCHPAD, .features = LITEST_TOUCHPAD | LITEST_BUTTON | LITEST_SINGLE_TOUCH, .interface = &interface, diff --git a/test/litest-device-synaptics-t440.c b/test/litest-device-synaptics-t440.c index e9f552bf..5e489876 100644 --- a/test/litest-device-synaptics-t440.c +++ b/test/litest-device-synaptics-t440.c @@ -103,8 +103,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; -TEST_DEVICE("synaptics-t440", - .type = LITEST_SYNAPTICS_TOPBUTTONPAD, +TEST_DEVICE(LITEST_SYNAPTICS_TOPBUTTONPAD, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON | LITEST_TOPBUTTONPAD, .interface = &interface, diff --git a/test/litest-device-synaptics-x1-carbon-3rd.c b/test/litest-device-synaptics-x1-carbon-3rd.c index b3efe47a..054ae606 100644 --- a/test/litest-device-synaptics-x1-carbon-3rd.c +++ b/test/litest-device-synaptics-x1-carbon-3rd.c @@ -110,8 +110,7 @@ static const char quirk_file[] = "MatchName=litest SynPS/2 Synaptics TouchPad X1C3rd\n" "ModelLenovoT450Touchpad=1\n"; -TEST_DEVICE("synaptics-carbon3rd", - .type = LITEST_SYNAPTICS_TRACKPOINT_BUTTONS, +TEST_DEVICE(LITEST_SYNAPTICS_TRACKPOINT_BUTTONS, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON, .interface = &interface, diff --git a/test/litest-device-synaptics-x220.c b/test/litest-device-synaptics-x220.c index c570297b..037ba883 100644 --- a/test/litest-device-synaptics-x220.c +++ b/test/litest-device-synaptics-x220.c @@ -102,8 +102,7 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; -TEST_DEVICE("synaptics-x220", - .type = LITEST_SYNAPTICS_CLICKPAD_X220, +TEST_DEVICE(LITEST_SYNAPTICS_CLICKPAD_X220, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON, .interface = &interface, diff --git a/test/litest-device-tablet-doubledial.c b/test/litest-device-tablet-doubledial.c index 34e4fd26..fa8210ea 100644 --- a/test/litest-device-tablet-doubledial.c +++ b/test/litest-device-tablet-doubledial.c @@ -65,8 +65,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("tablet-doubledial-pad", - .type = LITEST_TABLET_DOUBLEDIAL_PAD, +TEST_DEVICE(LITEST_TABLET_DOUBLEDIAL_PAD, .features = LITEST_TABLET_PAD | LITEST_DIAL, .interface = &interface, diff --git a/test/litest-device-tablet-mode-switch.c b/test/litest-device-tablet-mode-switch.c index ce2d6655..c2c1e646 100644 --- a/test/litest-device-tablet-mode-switch.c +++ b/test/litest-device-tablet-mode-switch.c @@ -47,8 +47,7 @@ static const char quirk_file[] = "MatchName=litest Unreliable Tablet Mode Switch device\n" "ModelTabletModeSwitchUnreliable=1\n"; -TEST_DEVICE("tablet-mode-switch-unreliable", - .type = LITEST_TABLET_MODE_UNRELIABLE, +TEST_DEVICE(LITEST_TABLET_MODE_UNRELIABLE, .features = LITEST_SWITCH, .interface = NULL, diff --git a/test/litest-device-tablet-rel-dial.c b/test/litest-device-tablet-rel-dial.c index c32b4c47..1bb81009 100644 --- a/test/litest-device-tablet-rel-dial.c +++ b/test/litest-device-tablet-rel-dial.c @@ -62,8 +62,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("tablet-rel-dial-pad", - .type = LITEST_TABLET_REL_DIAL_PAD, +TEST_DEVICE(LITEST_TABLET_REL_DIAL_PAD, .features = LITEST_TABLET_PAD | LITEST_DIAL, .interface = &interface, diff --git a/test/litest-device-thinkpad-extrabuttons.c b/test/litest-device-thinkpad-extrabuttons.c index 9643127d..ad773952 100644 --- a/test/litest-device-thinkpad-extrabuttons.c +++ b/test/litest-device-thinkpad-extrabuttons.c @@ -70,8 +70,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("thinkpad-extrabuttons", - .type = LITEST_THINKPAD_EXTRABUTTONS, +TEST_DEVICE(LITEST_THINKPAD_EXTRABUTTONS, .features = LITEST_KEYS | LITEST_SWITCH, .interface = NULL, diff --git a/test/litest-device-touch-screen.c b/test/litest-device-touch-screen.c index 95f6ec69..7baa05f6 100644 --- a/test/litest-device-touch-screen.c +++ b/test/litest-device-touch-screen.c @@ -82,8 +82,7 @@ static int events[] = { -1, -1 }; -TEST_DEVICE("generic-mt", - .type = LITEST_GENERIC_MULTITOUCH_SCREEN, +TEST_DEVICE(LITEST_GENERIC_MULTITOUCH_SCREEN, .features = LITEST_TOUCH|LITEST_ELLIPSE, .interface = &interface, diff --git a/test/litest-device-touchpad-palm-threshold-zero.c b/test/litest-device-touchpad-palm-threshold-zero.c index 698b30dc..75139aa2 100644 --- a/test/litest-device-touchpad-palm-threshold-zero.c +++ b/test/litest-device-touchpad-palm-threshold-zero.c @@ -110,8 +110,7 @@ static const char quirk_file[] = "MatchName=litest Touchpad PalmPressureThreshold 0\n" "AttrPalmPressureThreshold=0\n"; -TEST_DEVICE("touchpad-palmpressure-zero", - .type = LITEST_TOUCHPAD_PALMPRESSURE_ZERO, +TEST_DEVICE(LITEST_TOUCHPAD_PALMPRESSURE_ZERO, .features = LITEST_IGNORED, /* Only use for specific tests */ .interface = &interface, diff --git a/test/litest-device-touchscreen-fuzz.c b/test/litest-device-touchscreen-fuzz.c index 97369eef..9510ca5a 100644 --- a/test/litest-device-touchscreen-fuzz.c +++ b/test/litest-device-touchscreen-fuzz.c @@ -73,8 +73,7 @@ static int events[] = { -1, -1 }; -TEST_DEVICE("touchscreen-fuzz", - .type = LITEST_MULTITOUCH_FUZZ_SCREEN, +TEST_DEVICE(LITEST_MULTITOUCH_FUZZ_SCREEN, .features = LITEST_TOUCH, .interface = &interface, diff --git a/test/litest-device-touchscreen-invalid-range.c b/test/litest-device-touchscreen-invalid-range.c index d42cd354..b0c2613c 100644 --- a/test/litest-device-touchscreen-invalid-range.c +++ b/test/litest-device-touchscreen-invalid-range.c @@ -73,8 +73,7 @@ static int events[] = { -1, -1 }; -TEST_DEVICE("touchscreen-invalid-range", - .type = LITEST_TOUCHSCREEN_INVALID_RANGE, +TEST_DEVICE(LITEST_TOUCHSCREEN_INVALID_RANGE, .features = LITEST_TOUCH, .interface = &interface, diff --git a/test/litest-device-touchscreen-mt-tool.c b/test/litest-device-touchscreen-mt-tool.c index 811e95d2..f727b2ce 100644 --- a/test/litest-device-touchscreen-mt-tool.c +++ b/test/litest-device-touchscreen-mt-tool.c @@ -76,8 +76,7 @@ static int events[] = { -1, -1 }; -TEST_DEVICE("touchscreen-mt-tool-type", - .type = LITEST_TOUCHSCREEN_MT_TOOL_TYPE, +TEST_DEVICE(LITEST_TOUCHSCREEN_MT_TOOL_TYPE, .features = LITEST_TOUCH, .interface = &interface, diff --git a/test/litest-device-trackpoint.c b/test/litest-device-trackpoint.c index eaad8b74..4a40f0b3 100644 --- a/test/litest-device-trackpoint.c +++ b/test/litest-device-trackpoint.c @@ -43,8 +43,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("trackpoint", - .type = LITEST_TRACKPOINT, +TEST_DEVICE(LITEST_TRACKPOINT, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_POINTINGSTICK, .interface = NULL, diff --git a/test/litest-device-uclogic-tablet.c b/test/litest-device-uclogic-tablet.c index f21e042c..6bfd2239 100644 --- a/test/litest-device-uclogic-tablet.c +++ b/test/litest-device-uclogic-tablet.c @@ -94,8 +94,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("uclogic-tablet", - .type = LITEST_UCLOGIC_TABLET, +TEST_DEVICE(LITEST_UCLOGIC_TABLET, .features = LITEST_TABLET | LITEST_HOVER | LITEST_FORCED_PROXOUT, .interface = &interface, diff --git a/test/litest-device-vmware-virtual-usb-mouse.c b/test/litest-device-vmware-virtual-usb-mouse.c index 81fd0b7c..87beccc3 100644 --- a/test/litest-device-vmware-virtual-usb-mouse.c +++ b/test/litest-device-vmware-virtual-usb-mouse.c @@ -100,8 +100,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("vmware-virtmouse", - .type = LITEST_VMWARE_VIRTMOUSE, +TEST_DEVICE(LITEST_VMWARE_VIRTMOUSE, .features = LITEST_WHEEL | LITEST_BUTTON | LITEST_ABSOLUTE | LITEST_NO_DEBOUNCE, .interface = &interface, diff --git a/test/litest-device-wacom-bamboo-16fg-pen.c b/test/litest-device-wacom-bamboo-16fg-pen.c index 63aabffa..d5afb065 100644 --- a/test/litest-device-wacom-bamboo-16fg-pen.c +++ b/test/litest-device-wacom-bamboo-16fg-pen.c @@ -101,8 +101,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-bamboo-16fg-pen", - .type = LITEST_WACOM_BAMBOO_16FG_PEN, +TEST_DEVICE(LITEST_WACOM_BAMBOO_16FG_PEN, .features = LITEST_TABLET | LITEST_DISTANCE | LITEST_HOVER, .interface = &interface, diff --git a/test/litest-device-wacom-bamboo-2fg-finger.c b/test/litest-device-wacom-bamboo-2fg-finger.c index 08ba28cf..04a3c33f 100644 --- a/test/litest-device-wacom-bamboo-2fg-finger.c +++ b/test/litest-device-wacom-bamboo-2fg-finger.c @@ -78,8 +78,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-bamboo-2fg-finger", - .type = LITEST_WACOM_BAMBOO_2FG_FINGER, +TEST_DEVICE(LITEST_WACOM_BAMBOO_2FG_FINGER, .features = LITEST_TOUCHPAD, .interface = &interface, diff --git a/test/litest-device-wacom-bamboo-2fg-pad.c b/test/litest-device-wacom-bamboo-2fg-pad.c index 05f71ef3..782ef41e 100644 --- a/test/litest-device-wacom-bamboo-2fg-pad.c +++ b/test/litest-device-wacom-bamboo-2fg-pad.c @@ -61,8 +61,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-bamboo-2fg-pad", - .type = LITEST_WACOM_BAMBOO_2FG_PAD, +TEST_DEVICE(LITEST_WACOM_BAMBOO_2FG_PAD, .features = LITEST_TABLET_PAD, .interface = &interface, diff --git a/test/litest-device-wacom-bamboo-2fg-pen.c b/test/litest-device-wacom-bamboo-2fg-pen.c index 6889ff3f..21804b67 100644 --- a/test/litest-device-wacom-bamboo-2fg-pen.c +++ b/test/litest-device-wacom-bamboo-2fg-pen.c @@ -101,8 +101,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-bamboo-2fg-pen", - .type = LITEST_WACOM_BAMBOO_2FG_PEN, +TEST_DEVICE(LITEST_WACOM_BAMBOO_2FG_PEN, .features = LITEST_TABLET | LITEST_DISTANCE | LITEST_HOVER, .interface = &interface, diff --git a/test/litest-device-wacom-calibrated-tablet.c b/test/litest-device-wacom-calibrated-tablet.c index 1ffb6c8c..e5e12e17 100644 --- a/test/litest-device-wacom-calibrated-tablet.c +++ b/test/litest-device-wacom-calibrated-tablet.c @@ -124,8 +124,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-calibrated-tablet-pen", - .type = LITEST_WACOM_CALIBRATED_TABLET_PEN, +TEST_DEVICE(LITEST_WACOM_CALIBRATED_TABLET_PEN, .features = LITEST_TABLET|LITEST_PRECALIBRATED, .interface = &interface, diff --git a/test/litest-device-wacom-cintiq-12wx-pen.c b/test/litest-device-wacom-cintiq-12wx-pen.c index cf816a06..50302b8b 100644 --- a/test/litest-device-wacom-cintiq-12wx-pen.c +++ b/test/litest-device-wacom-cintiq-12wx-pen.c @@ -137,8 +137,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-cintiq-12wx-pen", - .type = LITEST_WACOM_CINTIQ_12WX_PEN, +TEST_DEVICE(LITEST_WACOM_CINTIQ_12WX_PEN, .features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | LITEST_TILT | LITEST_DIRECT | LITEST_HOVER, .interface = &interface, diff --git a/test/litest-device-wacom-cintiq-13hdt-finger.c b/test/litest-device-wacom-cintiq-13hdt-finger.c index 7988f048..81748f84 100644 --- a/test/litest-device-wacom-cintiq-13hdt-finger.c +++ b/test/litest-device-wacom-cintiq-13hdt-finger.c @@ -81,8 +81,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-cintiq-13hdt-finger", - .type = LITEST_WACOM_CINTIQ_13HDT_FINGER, +TEST_DEVICE(LITEST_WACOM_CINTIQ_13HDT_FINGER, .features = LITEST_TOUCH, .interface = &interface, diff --git a/test/litest-device-wacom-cintiq-13hdt-pad.c b/test/litest-device-wacom-cintiq-13hdt-pad.c index 307eaa77..3afc20b5 100644 --- a/test/litest-device-wacom-cintiq-13hdt-pad.c +++ b/test/litest-device-wacom-cintiq-13hdt-pad.c @@ -90,8 +90,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-cintiq-13hdt-pad", - .type = LITEST_WACOM_CINTIQ_13HDT_PAD, +TEST_DEVICE(LITEST_WACOM_CINTIQ_13HDT_PAD, .features = LITEST_TABLET_PAD | LITEST_RING, .interface = &interface, diff --git a/test/litest-device-wacom-cintiq-13hdt-pen.c b/test/litest-device-wacom-cintiq-13hdt-pen.c index 19ff55da..375e5c6b 100644 --- a/test/litest-device-wacom-cintiq-13hdt-pen.c +++ b/test/litest-device-wacom-cintiq-13hdt-pen.c @@ -126,8 +126,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-cintiq-13hdt-pen", - .type = LITEST_WACOM_CINTIQ_13HDT_PEN, +TEST_DEVICE(LITEST_WACOM_CINTIQ_13HDT_PEN, .features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | LITEST_TILT | LITEST_DIRECT | LITEST_HOVER, .interface = &interface, diff --git a/test/litest-device-wacom-cintiq-24hd-pen.c b/test/litest-device-wacom-cintiq-24hd-pen.c index 21e58b0f..ea577a14 100644 --- a/test/litest-device-wacom-cintiq-24hd-pen.c +++ b/test/litest-device-wacom-cintiq-24hd-pen.c @@ -126,8 +126,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-cintiq-24hd-pen", - .type = LITEST_WACOM_CINTIQ_24HD_PEN, +TEST_DEVICE(LITEST_WACOM_CINTIQ_24HD_PEN, .features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | LITEST_TILT | LITEST_DIRECT | LITEST_HOVER, .interface = &interface, diff --git a/test/litest-device-wacom-cintiq-24hdt-pad.c b/test/litest-device-wacom-cintiq-24hdt-pad.c index d3e47123..3b1bd170 100644 --- a/test/litest-device-wacom-cintiq-24hdt-pad.c +++ b/test/litest-device-wacom-cintiq-24hdt-pad.c @@ -113,8 +113,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-cintiq-24hdt-pad", - .type = LITEST_WACOM_CINTIQ_24HDT_PAD, +TEST_DEVICE(LITEST_WACOM_CINTIQ_24HDT_PAD, .features = LITEST_TABLET_PAD | LITEST_RING, .teardown = litest_wacom_cintiq_pad_teardown, .interface = &interface, diff --git a/test/litest-device-wacom-cintiq-pro-16-finger.c b/test/litest-device-wacom-cintiq-pro-16-finger.c index a51a1383..1d7faa4a 100644 --- a/test/litest-device-wacom-cintiq-pro-16-finger.c +++ b/test/litest-device-wacom-cintiq-pro-16-finger.c @@ -80,8 +80,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-cintiq-pro16-finger", - .type = LITEST_WACOM_CINTIQ_PRO16_FINGER, +TEST_DEVICE(LITEST_WACOM_CINTIQ_PRO16_FINGER, .features = LITEST_TOUCH, .interface = &interface, diff --git a/test/litest-device-wacom-cintiq-pro-16-pad.c b/test/litest-device-wacom-cintiq-pro-16-pad.c index c5dcfb1f..d2259cc1 100644 --- a/test/litest-device-wacom-cintiq-pro-16-pad.c +++ b/test/litest-device-wacom-cintiq-pro-16-pad.c @@ -60,8 +60,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-cintiq-pro16-pad", - .type = LITEST_WACOM_CINTIQ_PRO16_PAD, +TEST_DEVICE(LITEST_WACOM_CINTIQ_PRO16_PAD, .features = LITEST_TABLET_PAD, .interface = &interface, diff --git a/test/litest-device-wacom-cintiq-pro-16-pen.c b/test/litest-device-wacom-cintiq-pro-16-pen.c index 3b9dc1a4..ce54d3ce 100644 --- a/test/litest-device-wacom-cintiq-pro-16-pen.c +++ b/test/litest-device-wacom-cintiq-pro-16-pen.c @@ -133,8 +133,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-cintiq-pro16-pen", - .type = LITEST_WACOM_CINTIQ_PRO16_PEN, +TEST_DEVICE(LITEST_WACOM_CINTIQ_PRO16_PEN, .features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | LITEST_TILT | LITEST_DIRECT | LITEST_HOVER, .interface = &interface, diff --git a/test/litest-device-wacom-ekr.c b/test/litest-device-wacom-ekr.c index e2fee266..060f5965 100644 --- a/test/litest-device-wacom-ekr.c +++ b/test/litest-device-wacom-ekr.c @@ -100,8 +100,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-ekr", - .type = LITEST_WACOM_EKR, +TEST_DEVICE(LITEST_WACOM_EKR, .features = LITEST_TABLET_PAD | LITEST_RING, .interface = &interface, diff --git a/test/litest-device-wacom-hid4800-pen.c b/test/litest-device-wacom-hid4800-pen.c index edc73704..b9d3a167 100644 --- a/test/litest-device-wacom-hid4800-pen.c +++ b/test/litest-device-wacom-hid4800-pen.c @@ -98,8 +98,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-hid4800-pen", - .type = LITEST_WACOM_HID4800_PEN, +TEST_DEVICE(LITEST_WACOM_HID4800_PEN, .features = LITEST_TABLET | LITEST_HOVER, .interface = &interface, diff --git a/test/litest-device-wacom-intuos3-pad.c b/test/litest-device-wacom-intuos3-pad.c index 7c972c88..237b8e28 100644 --- a/test/litest-device-wacom-intuos3-pad.c +++ b/test/litest-device-wacom-intuos3-pad.c @@ -85,8 +85,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-intuos3-pad", - .type = LITEST_WACOM_INTUOS3_PAD, +TEST_DEVICE(LITEST_WACOM_INTUOS3_PAD, .features = LITEST_TABLET_PAD | LITEST_STRIP, .interface = &interface, diff --git a/test/litest-device-wacom-intuos5-finger.c b/test/litest-device-wacom-intuos5-finger.c index d94a8e29..412b3ee3 100644 --- a/test/litest-device-wacom-intuos5-finger.c +++ b/test/litest-device-wacom-intuos5-finger.c @@ -103,8 +103,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-intuos5-finger", - .type = LITEST_WACOM_INTUOS5_FINGER, +TEST_DEVICE(LITEST_WACOM_INTUOS5_FINGER, .features = LITEST_TOUCHPAD, .interface = &interface, diff --git a/test/litest-device-wacom-intuos5-pad.c b/test/litest-device-wacom-intuos5-pad.c index 4091c7be..12cf66d4 100644 --- a/test/litest-device-wacom-intuos5-pad.c +++ b/test/litest-device-wacom-intuos5-pad.c @@ -90,8 +90,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-intuos5-pad", - .type = LITEST_WACOM_INTUOS5_PAD, +TEST_DEVICE(LITEST_WACOM_INTUOS5_PAD, .features = LITEST_TABLET_PAD | LITEST_RING, .interface = &interface, diff --git a/test/litest-device-wacom-intuos5-pen.c b/test/litest-device-wacom-intuos5-pen.c index 283d1290..14cc8f30 100644 --- a/test/litest-device-wacom-intuos5-pen.c +++ b/test/litest-device-wacom-intuos5-pen.c @@ -142,8 +142,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-intuos5-tablet-pen", - .type = LITEST_WACOM_INTUOS5_PEN, +TEST_DEVICE(LITEST_WACOM_INTUOS5_PEN, .features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | LITEST_TILT | LITEST_TOOL_MOUSE | LITEST_HOVER, .interface = &interface, diff --git a/test/litest-device-wacom-isdv4-4200-pen.c b/test/litest-device-wacom-isdv4-4200-pen.c index 366363d9..115f1612 100644 --- a/test/litest-device-wacom-isdv4-4200-pen.c +++ b/test/litest-device-wacom-isdv4-4200-pen.c @@ -98,8 +98,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-isdv4-4200-pen", - .type = LITEST_WACOM_ISDV4_4200_PEN, +TEST_DEVICE(LITEST_WACOM_ISDV4_4200_PEN, .features = LITEST_TABLET|LITEST_HOVER, .interface = &interface, diff --git a/test/litest-device-wacom-isdv4-524c-pen.c b/test/litest-device-wacom-isdv4-524c-pen.c index f2054d05..72de7d78 100644 --- a/test/litest-device-wacom-isdv4-524c-pen.c +++ b/test/litest-device-wacom-isdv4-524c-pen.c @@ -152,8 +152,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-isdv4-524c-pen", - .type = LITEST_WACOM_ISDV4_524C_PEN, +TEST_DEVICE(LITEST_WACOM_ISDV4_524C_PEN, .features = LITEST_TABLET|LITEST_HOVER, .interface = &interface, diff --git a/test/litest-device-wacom-isdv4-e6-finger.c b/test/litest-device-wacom-isdv4-e6-finger.c index cfcde44e..b42d1944 100644 --- a/test/litest-device-wacom-isdv4-e6-finger.c +++ b/test/litest-device-wacom-isdv4-e6-finger.c @@ -76,8 +76,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-isdv4-e6-finger", - .type = LITEST_WACOM_ISDV4_E6_FINGER, +TEST_DEVICE(LITEST_WACOM_ISDV4_E6_FINGER, .features = LITEST_TOUCH, .interface = &interface, diff --git a/test/litest-device-wacom-isdv4-e6-pen.c b/test/litest-device-wacom-isdv4-e6-pen.c index 7597681c..939c5663 100644 --- a/test/litest-device-wacom-isdv4-e6-pen.c +++ b/test/litest-device-wacom-isdv4-e6-pen.c @@ -91,8 +91,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-isdv4-e6-pen", - .type = LITEST_WACOM_ISDV4_E6_PEN, +TEST_DEVICE(LITEST_WACOM_ISDV4_E6_PEN, .features = LITEST_TABLET | LITEST_HOVER, .interface = &interface, diff --git a/test/litest-device-wacom-mobilestudio-pro-pad.c b/test/litest-device-wacom-mobilestudio-pro-pad.c index b810f592..7cd3daa6 100644 --- a/test/litest-device-wacom-mobilestudio-pro-pad.c +++ b/test/litest-device-wacom-mobilestudio-pro-pad.c @@ -96,8 +96,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("wacom-mobilestudio-pro16-pad", - .type = LITEST_WACOM_MOBILESTUDIO_PRO_16_PAD, +TEST_DEVICE(LITEST_WACOM_MOBILESTUDIO_PRO_16_PAD, .features = LITEST_TABLET_PAD | LITEST_RING, .interface = &interface, diff --git a/test/litest-device-waltop-tablet.c b/test/litest-device-waltop-tablet.c index 62561e15..343f1295 100644 --- a/test/litest-device-waltop-tablet.c +++ b/test/litest-device-waltop-tablet.c @@ -225,8 +225,7 @@ static const char quirk_file[] = "MatchName=litest WALTOP Batteryless Tablet*\n" "AttrSizeHint=200x200\n"; -TEST_DEVICE("waltop-tablet", - .type = LITEST_WALTOP, +TEST_DEVICE(LITEST_WALTOP, .features = LITEST_TABLET | LITEST_WHEEL | LITEST_TILT | LITEST_HOVER, .interface = &interface, diff --git a/test/litest-device-wheel-only.c b/test/litest-device-wheel-only.c index c2bbecbd..7071a544 100644 --- a/test/litest-device-wheel-only.c +++ b/test/litest-device-wheel-only.c @@ -37,8 +37,7 @@ static int events[] = { -1 , -1, }; -TEST_DEVICE("wheel-only", - .type = LITEST_WHEEL_ONLY, +TEST_DEVICE(LITEST_WHEEL_ONLY, .features = LITEST_WHEEL, .interface = NULL, diff --git a/test/litest-device-xen-virtual-pointer.c b/test/litest-device-xen-virtual-pointer.c index 79c4c555..5034c9b3 100644 --- a/test/litest-device-xen-virtual-pointer.c +++ b/test/litest-device-xen-virtual-pointer.c @@ -91,8 +91,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("xen-pointer", - .type = LITEST_XEN_VIRTUAL_POINTER, +TEST_DEVICE(LITEST_XEN_VIRTUAL_POINTER, .features = LITEST_WHEEL | LITEST_BUTTON | LITEST_ABSOLUTE, .interface = &interface, diff --git a/test/litest-device-yubikey.c b/test/litest-device-yubikey.c index 78b22790..e010796d 100644 --- a/test/litest-device-yubikey.c +++ b/test/litest-device-yubikey.c @@ -147,8 +147,7 @@ static int events[] = { -1, -1, }; -TEST_DEVICE("yubikey", - .type = LITEST_YUBIKEY, +TEST_DEVICE(LITEST_YUBIKEY, .features = LITEST_KEYS, .interface = NULL, diff --git a/test/litest.h b/test/litest.h index 08c7de0d..3b5df505 100644 --- a/test/litest.h +++ b/test/litest.h @@ -53,7 +53,7 @@ struct test_device { struct litest_test_device *device; } __attribute__((aligned(16))); -#define TEST_DEVICE(name, ...) \ +#define TEST_DEVICE(which, ...) \ static struct litest_test_device _device; \ \ static void _setup(void) { \ @@ -64,11 +64,12 @@ struct test_device { static const struct test_device _test_device \ __attribute__ ((used)) \ __attribute__ ((section ("test_device_section"))) = { \ - name, &_device \ + #which, &_device \ }; \ static struct litest_test_device _device = { \ .setup = _setup, \ - .shortname = name, \ + .shortname = #which, \ + .type = which, \ __VA_ARGS__ \ };