diff --git a/test/litest-device-absinfo-override.c b/test/litest-device-absinfo-override.c index 04c45c31..91c3f94d 100644 --- a/test/litest-device-absinfo-override.c +++ b/test/litest-device-absinfo-override.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x4567, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -44,7 +45,9 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_POINTER, -1 , -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 2000, 0, 0, 0 }, { ABS_Y, 0, 1400, 0, 0, 0 }, @@ -55,6 +58,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ /* This device only exists to verify that the EVDEV_ABS override bits work * correctly */ diff --git a/test/litest-device-acer-hawaii-keyboard.c b/test/litest-device-acer-hawaii-keyboard.c index b0a830a7..e6154db7 100644 --- a/test/litest-device-acer-hawaii-keyboard.c +++ b/test/litest-device-acer-hawaii-keyboard.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x1558, }; +/* clang-format off */ static int events[] = { EV_KEY, KEY_ESC, EV_KEY, KEY_1, @@ -187,6 +188,7 @@ static int events[] = { EV_KEY, KEY_FN, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_ACER_HAWAII_KEYBOARD, .features = LITEST_KEYS, diff --git a/test/litest-device-acer-hawaii-touchpad.c b/test/litest-device-acer-hawaii-touchpad.c index d651bfe7..5c1f3fc1 100644 --- a/test/litest-device-acer-hawaii-touchpad.c +++ b/test/litest-device-acer-hawaii-touchpad.c @@ -58,6 +58,7 @@ static struct input_id input_id = { .product = 0x1558, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_TOOL_FINGER, @@ -70,7 +71,9 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_BUTTONPAD, -1, -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1151, 0, 0, 12 }, { ABS_Y, 0, 738, 0, 0, 14 }, @@ -80,6 +83,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ TEST_DEVICE(LITEST_ACER_HAWAII_TOUCHPAD, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON, diff --git a/test/litest-device-aiptek-tablet.c b/test/litest-device-aiptek-tablet.c index 5ceb3a9b..55d7f0e5 100644 --- a/test/litest-device-aiptek-tablet.c +++ b/test/litest-device-aiptek-tablet.c @@ -76,6 +76,7 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 5999, 0, 0, 26 }, { ABS_Y, 0, 4499, 0, 0, 15 }, @@ -85,6 +86,7 @@ static struct input_absinfo absinfo[] = { { ABS_TILT_Y, -128, 127, 0, 0, 0 }, /* mute axis */ { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -92,6 +94,7 @@ static struct input_id input_id = { .product = 0x10, }; +/* clang-format off */ static int events[] = { EV_KEY, KEY_ESC, EV_KEY, KEY_F1, @@ -145,6 +148,7 @@ static int events[] = { EV_MSC, MSC_SERIAL, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_AIPTEK, .features = LITEST_TABLET | LITEST_HOVER | LITEST_FORCED_PROXOUT, diff --git a/test/litest-device-alps-3fg.c b/test/litest-device-alps-3fg.c index 8aa0cc6f..e6f00fcb 100644 --- a/test/litest-device-alps-3fg.c +++ b/test/litest-device-alps-3fg.c @@ -140,6 +140,7 @@ static struct input_id input_id = { .version = 0x700, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -153,8 +154,10 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_POINTER, -1, -1, }; +/* clang-format on */ /* Note: we use the user-supplied resolution here, see #408 */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 4095, 0, 0, 37 }, { ABS_Y, 0, 2047, 0, 0, 26 }, @@ -165,6 +168,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ TEST_DEVICE(LITEST_ALPS_3FG, .features = LITEST_TOUCHPAD | LITEST_BUTTON, diff --git a/test/litest-device-alps-dualpoint.c b/test/litest-device-alps-dualpoint.c index 9e6a575d..25467185 100644 --- a/test/litest-device-alps-dualpoint.c +++ b/test/litest-device-alps-dualpoint.c @@ -79,6 +79,7 @@ static struct input_id input_id = { .version = 0x310, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -92,7 +93,9 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_SEMI_MT, -1, -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 2000, 0, 0, 25 }, { ABS_Y, 0, 1400, 0, 0, 32 }, @@ -103,6 +106,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ static const char quirk_file[] = "[litest ALPS Touchpad]\n" diff --git a/test/litest-device-alps-semi-mt.c b/test/litest-device-alps-semi-mt.c index b8de1044..7e44f5d9 100644 --- a/test/litest-device-alps-semi-mt.c +++ b/test/litest-device-alps-semi-mt.c @@ -78,6 +78,7 @@ static struct input_id input_id = { .product = 0x8, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -91,7 +92,9 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_SEMI_MT, -1, -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 2000, 0, 0, 0 }, { ABS_Y, 0, 1400, 0, 0, 0 }, @@ -102,6 +105,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ TEST_DEVICE(LITEST_ALPS_SEMI_MT, .features = LITEST_TOUCHPAD | LITEST_BUTTON | LITEST_SEMI_MT, diff --git a/test/litest-device-anker-mouse-kbd.c b/test/litest-device-anker-mouse-kbd.c index f0511f19..d3bb22f3 100644 --- a/test/litest-device-anker-mouse-kbd.c +++ b/test/litest-device-anker-mouse-kbd.c @@ -36,6 +36,7 @@ static struct input_id input_id = { .product = 0xfa50, }; +/* clang-format off */ static int events[] = { EV_REL, REL_HWHEEL, EV_KEY, KEY_ESC, @@ -183,7 +184,9 @@ static int events[] = { EV_MSC, MSC_SCAN, -1 , -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_VOLUME, 0, 4096, 0, 0, 0 }, { ABS_MISC, 0, 255, 0, 0, 0 }, @@ -205,6 +208,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_POSITION_X, 0, 255, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ TEST_DEVICE(LITEST_ANKER_MOUSE_KBD, .features = LITEST_KEYS | LITEST_WHEEL, diff --git a/test/litest-device-apple-appletouch.c b/test/litest-device-apple-appletouch.c index b85c9c0f..1f42ffc2 100644 --- a/test/litest-device-apple-appletouch.c +++ b/test/litest-device-apple-appletouch.c @@ -67,6 +67,7 @@ static struct input_id input_id = { .product = 0x21a, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_TOOL_FINGER, @@ -75,13 +76,16 @@ static int events[] = { EV_KEY, BTN_TOOL_TRIPLETAP, -1, -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1215, 0, 0, 0 }, { ABS_Y, 0, 588, 0, 0, 0 }, { ABS_PRESSURE, 0, 300, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ static const char quirk_file[] = "[litest Apple Touchpad]\n" diff --git a/test/litest-device-apple-internal-keyboard.c b/test/litest-device-apple-internal-keyboard.c index 4118e703..1aacbed8 100644 --- a/test/litest-device-apple-internal-keyboard.c +++ b/test/litest-device-apple-internal-keyboard.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x273, }; +/* clang-format off */ static int events[] = { EV_KEY, KEY_ESC, EV_KEY, KEY_1, @@ -216,6 +217,7 @@ static int events[] = { EV_LED, LED_KANA, -1, -1 }; +/* clang-format on */ TEST_DEVICE(LITEST_APPLE_KEYBOARD, .features = LITEST_KEYS, diff --git a/test/litest-device-apple-magicmouse.c b/test/litest-device-apple-magicmouse.c index a3ce10c3..3bedb6dc 100644 --- a/test/litest-device-apple-magicmouse.c +++ b/test/litest-device-apple-magicmouse.c @@ -60,6 +60,7 @@ static struct input_id input_id = { .product = 0x30d, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -70,7 +71,9 @@ static int events[] = { EV_REL, REL_HWHEEL, -1 , -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_MT_SLOT, 0, 15, 0, 0, 0 }, { ABS_MT_TOUCH_MAJOR, 0, 1020, 0, 0, 0 }, @@ -81,6 +84,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ TEST_DEVICE(LITEST_MAGICMOUSE, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, diff --git a/test/litest-device-asus-rog-gladius.c b/test/litest-device-asus-rog-gladius.c index 18459389..b318bd1d 100644 --- a/test/litest-device-asus-rog-gladius.c +++ b/test/litest-device-asus-rog-gladius.c @@ -35,6 +35,7 @@ static struct input_id input_id = { .product = 0x181a, }; +/* clang-format off */ static int events[] = { EV_REL, REL_X, EV_REL, REL_Y, @@ -306,11 +307,14 @@ static int events[] = { EV_LED, LED_KANA, -1 , -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_VOLUME, 0, 668, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ TEST_DEVICE(LITEST_MOUSE_GLADIUS, .features = LITEST_RELATIVE | LITEST_WHEEL | LITEST_KEYS, diff --git a/test/litest-device-atmel-hover.c b/test/litest-device-atmel-hover.c index 52137480..042db8a7 100644 --- a/test/litest-device-atmel-hover.c +++ b/test/litest-device-atmel-hover.c @@ -92,6 +92,7 @@ static struct input_id input_id = { .product = 0x0, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_TOOL_FINGER, @@ -104,7 +105,9 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_BUTTONPAD, -1, -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 960, 0, 0, 10 }, { ABS_Y, 0, 540, 0, 0, 10 }, @@ -120,6 +123,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_DISTANCE, 0, 1, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ TEST_DEVICE(LITEST_ATMEL_HOVER, .features = LITEST_TOUCHPAD | LITEST_BUTTON | LITEST_CLICKPAD | LITEST_HOVER, diff --git a/test/litest-device-bcm5974.c b/test/litest-device-bcm5974.c index 030a45f7..f54d0264 100644 --- a/test/litest-device-bcm5974.c +++ b/test/litest-device-bcm5974.c @@ -80,6 +80,7 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, -4824, 4824, 0, 0, 0 }, { ABS_Y, -172, 4290, 0, 0, 0 }, @@ -96,6 +97,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -103,6 +105,7 @@ static struct input_id input_id = { .product = 0x249, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_TOOL_FINGER, @@ -114,6 +117,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_BUTTONPAD, -1, -1 }; +/* clang-format on */ TEST_DEVICE(LITEST_BCM5974, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | diff --git a/test/litest-device-calibrated-touchscreen.c b/test/litest-device-calibrated-touchscreen.c index d68c136a..bf02f1a6 100644 --- a/test/litest-device-calibrated-touchscreen.c +++ b/test/litest-device-calibrated-touchscreen.c @@ -48,6 +48,7 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1500, 0, 0, 0 }, { ABS_Y, 0, 2500, 0, 0, 0 }, @@ -57,6 +58,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x11, @@ -64,11 +66,13 @@ static struct input_id input_id = { .product = 0x33, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOUCH, INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1 }; +/* clang-format on */ TEST_DEVICE(LITEST_CALIBRATED_TOUCHSCREEN, .features = LITEST_TOUCH|LITEST_PRECALIBRATED, diff --git a/test/litest-device-cyborg-rat-5.c b/test/litest-device-cyborg-rat-5.c index 93cfc1c5..92024bc1 100644 --- a/test/litest-device-cyborg-rat-5.c +++ b/test/litest-device-cyborg-rat-5.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0xcd5, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -48,6 +49,7 @@ static int events[] = { EV_REL, REL_WHEEL, -1 , -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_CYBORG_RAT, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, diff --git a/test/litest-device-dell-canvas-totem-touch.c b/test/litest-device-dell-canvas-totem-touch.c index b68ebf8f..86962880 100644 --- a/test/litest-device-dell-canvas-totem-touch.c +++ b/test/litest-device-dell-canvas-totem-touch.c @@ -52,6 +52,7 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_MT_SLOT, 0, 4, 0, 0, 0 }, { ABS_X, 0, 32767, 0, 0, 55 }, @@ -61,6 +62,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -69,12 +71,14 @@ static struct input_id input_id = { .version = 0x111, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOUCH, EV_MSC, MSC_TIMESTAMP, INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_DELL_CANVAS_TOTEM_TOUCH, .features = LITEST_TOUCH, diff --git a/test/litest-device-dell-canvas-totem.c b/test/litest-device-dell-canvas-totem.c index 20c96d99..8f9076c4 100644 --- a/test/litest-device-dell-canvas-totem.c +++ b/test/litest-device-dell-canvas-totem.c @@ -79,6 +79,7 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_MT_SLOT, 0, 4, 0, 0, 0 }, { ABS_MT_TOUCH_MAJOR, 0, 32767, 0, 0, 10 }, @@ -92,6 +93,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -100,12 +102,14 @@ static struct input_id input_id = { .version = 0x111, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_0, EV_MSC, MSC_TIMESTAMP, INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_DELL_CANVAS_TOTEM, .features = LITEST_TOTEM | LITEST_TABLET, diff --git a/test/litest-device-elan-tablet.c b/test/litest-device-elan-tablet.c index cd93b619..74b46547 100644 --- a/test/litest-device-elan-tablet.c +++ b/test/litest-device-elan-tablet.c @@ -106,12 +106,14 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 18176, 0, 0, 62 }, { ABS_Y, 0, 10240, 0, 0, 62 }, { ABS_PRESSURE, 0, 4096, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x18, @@ -125,6 +127,7 @@ static struct input_id input_id = { * The one in the issue isn't the exact same model, but only the pid and x/y * axis max differs differs. */ +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOOL_PEN, EV_KEY, BTN_TOOL_RUBBER, @@ -133,6 +136,7 @@ static int events[] = { EV_MSC, MSC_SCAN, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_ELAN_TABLET, .features = LITEST_TABLET, diff --git a/test/litest-device-elantech-touchpad.c b/test/litest-device-elantech-touchpad.c index 19dff009..8c29578f 100644 --- a/test/litest-device-elantech-touchpad.c +++ b/test/litest-device-elantech-touchpad.c @@ -74,6 +74,7 @@ static struct input_id input_id = { .product = 0xe, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -85,7 +86,9 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_POINTER, -1, -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1280, 0, 0, 0 }, { ABS_Y, 0, 704, 0, 0, 0 }, @@ -97,6 +100,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ TEST_DEVICE(LITEST_ELANTECH_TOUCHPAD, .features = LITEST_TOUCHPAD | LITEST_BUTTON, diff --git a/test/litest-device-format-string.c b/test/litest-device-format-string.c index d9f72855..a98d1ffe 100644 --- a/test/litest-device-format-string.c +++ b/test/litest-device-format-string.c @@ -33,6 +33,7 @@ static struct input_id input_id = { .product = 0x0456, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -43,6 +44,7 @@ static int events[] = { EV_REL, REL_WHEEL_HI_RES, -1 , -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_MOUSE_FORMAT_STRING, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, diff --git a/test/litest-device-generic-pressurepad.c b/test/litest-device-generic-pressurepad.c index c83f1be1..c2f18d43 100644 --- a/test/litest-device-generic-pressurepad.c +++ b/test/litest-device-generic-pressurepad.c @@ -86,6 +86,7 @@ static struct input_id input_id = { .product = 0x4567, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_TOOL_FINGER, @@ -98,7 +99,9 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_BUTTONPAD, -1, -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1224, 0, 0, 12 }, { ABS_Y, 0, 756, 0, 0, 12 }, @@ -111,6 +114,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TOOL_TYPE, 0, 2, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ TEST_DEVICE(LITEST_GENERIC_PRESSUREPAD, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON, diff --git a/test/litest-device-generic-singletouch.c b/test/litest-device-generic-singletouch.c index c61a4220..9c756595 100644 --- a/test/litest-device-generic-singletouch.c +++ b/test/litest-device-generic-singletouch.c @@ -47,11 +47,13 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 10000, 20000, 0, 0, 10 }, { ABS_Y, -2000, 2000, 0, 0, 9 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x01, @@ -59,11 +61,13 @@ static struct input_id input_id = { .product = 0x03, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOUCH, INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_GENERIC_SINGLETOUCH, .features = LITEST_SINGLE_TOUCH, diff --git a/test/litest-device-gpio-keys.c b/test/litest-device-gpio-keys.c index 51d9fa5f..de567b56 100644 --- a/test/litest-device-gpio-keys.c +++ b/test/litest-device-gpio-keys.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x1, }; +/* clang-format off */ static int events[] = { EV_SW, SW_LID, EV_SW, SW_TABLET_MODE, @@ -41,6 +42,7 @@ static int events[] = { EV_KEY, KEY_POWER, -1, -1, }; +/* clang-format on */ static const char quirk_file[] = "[litest gpio quirk]\n" diff --git a/test/litest-device-hp-wmi-hotkeys.c b/test/litest-device-hp-wmi-hotkeys.c index ee69c581..f56b5c93 100644 --- a/test/litest-device-hp-wmi-hotkeys.c +++ b/test/litest-device-hp-wmi-hotkeys.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x000, }; +/* clang-format off */ static int events[] = { EV_KEY, KEY_HELP, EV_KEY, KEY_SETUP, @@ -46,6 +47,7 @@ static int events[] = { EV_SW, SW_DOCK, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_HP_WMI_HOTKEYS, .features = LITEST_SWITCH, diff --git a/test/litest-device-huion-pentablet.c b/test/litest-device-huion-pentablet.c index f098dbc6..a6afa701 100644 --- a/test/litest-device-huion-pentablet.c +++ b/test/litest-device-huion-pentablet.c @@ -73,12 +73,14 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 40000, 0, 0, 157 }, { ABS_Y, 0, 25000, 0, 0, 157 }, { ABS_PRESSURE, 0, 2047, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -87,6 +89,7 @@ static struct input_id input_id = { .product = 0x6e, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOOL_PEN, EV_KEY, BTN_TOUCH, @@ -95,6 +98,7 @@ static int events[] = { EV_MSC, MSC_SCAN, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_HUION_TABLET, .features = LITEST_TABLET | LITEST_HOVER | LITEST_FORCED_PROXOUT, diff --git a/test/litest-device-huion-q620m-dial.c b/test/litest-device-huion-q620m-dial.c index 13568f15..9d1b7275 100644 --- a/test/litest-device-huion-q620m-dial.c +++ b/test/litest-device-huion-q620m-dial.c @@ -39,12 +39,14 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1, 0, 0, 0 }, { ABS_Y, 0, 1, 0, 0, 0 }, { ABS_MISC, 0, 255, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -53,12 +55,16 @@ static struct input_id input_id = { .product = 0x006d, }; +/* clang-format off */ +/* clang-format off */ static int events[] = { EV_KEY, BTN_0, EV_REL, REL_WHEEL, EV_REL, REL_WHEEL_HI_RES, -1, -1, }; +/* clang-format on */ +/* clang-format on */ /* Device from https://gitlab.freedesktop.org/libinput/libinput/-/issues/600 */ TEST_DEVICE(LITEST_HUION_Q620M_DIAL, diff --git a/test/litest-device-ignored-mouse.c b/test/litest-device-ignored-mouse.c index 142eaa9d..73db0c98 100644 --- a/test/litest-device-ignored-mouse.c +++ b/test/litest-device-ignored-mouse.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x6019, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -41,6 +42,7 @@ static int events[] = { EV_REL, REL_WHEEL, -1 , -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_IGNORED_MOUSE, .features = LITEST_IGNORED | LITEST_BUTTON | LITEST_RELATIVE, diff --git a/test/litest-device-keyboard-quirked.c b/test/litest-device-keyboard-quirked.c index 2b6c6536..f4f209e9 100644 --- a/test/litest-device-keyboard-quirked.c +++ b/test/litest-device-keyboard-quirked.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x1, }; +/* clang-format off */ static int events[] = { EV_REL, REL_X, EV_REL, REL_Y, @@ -197,6 +198,7 @@ static int events[] = { -1, -1, }; +/* clang-format on */ static const char quirk_file[] = "[litest Quirked Keyboard enable buttons]\n" diff --git a/test/litest-device-keyboard-razer-blackwidow.c b/test/litest-device-keyboard-razer-blackwidow.c index c8613e3d..a636a29e 100644 --- a/test/litest-device-keyboard-razer-blackwidow.c +++ b/test/litest-device-keyboard-razer-blackwidow.c @@ -38,6 +38,7 @@ static struct input_id input_id = { .product = 0x11b, }; +/* clang-format off */ static int events[] = { EV_REL, REL_HWHEEL, EV_KEY, KEY_ESC, @@ -299,7 +300,9 @@ static int events[] = { EV_MSC, MSC_SCAN, -1 , -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_VOLUME, 0, 572, 0, 0, 0 }, { ABS_MISC, 0, 255, 0, 0, 0 }, @@ -331,6 +334,7 @@ static struct input_absinfo absinfo[] = { { 0x3f, 0, 255, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ TEST_DEVICE(LITEST_KEYBOARD_BLACKWIDOW, .features = LITEST_KEYS | LITEST_WHEEL, diff --git a/test/litest-device-keyboard-razer-blade-stealth-videoswitch.c b/test/litest-device-keyboard-razer-blade-stealth-videoswitch.c index 5115d5ca..b2800096 100644 --- a/test/litest-device-keyboard-razer-blade-stealth-videoswitch.c +++ b/test/litest-device-keyboard-razer-blade-stealth-videoswitch.c @@ -36,6 +36,7 @@ static struct input_id input_id = { .product = 0x220, }; +/* clang-format off */ static int events[] = { EV_KEY, KEY_ESC, EV_KEY, KEY_1, @@ -206,6 +207,7 @@ static int events[] = { EV_MSC, MSC_SCAN, -1 , -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_KEYBOARD_BLADE_STEALTH_VIDEOSWITCH, .features = LITEST_KEYS, diff --git a/test/litest-device-keyboard-razer-blade-stealth.c b/test/litest-device-keyboard-razer-blade-stealth.c index 6000d8c4..93e4975b 100644 --- a/test/litest-device-keyboard-razer-blade-stealth.c +++ b/test/litest-device-keyboard-razer-blade-stealth.c @@ -36,6 +36,7 @@ static struct input_id input_id = { .product = 0x220, }; +/* clang-format off */ static int events[] = { EV_REL, REL_HWHEEL, EV_KEY, BTN_0, @@ -297,7 +298,9 @@ static int events[] = { EV_MSC, MSC_SCAN, -1 , -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_VOLUME, 0, 572, 0, 0, 0 }, { ABS_MISC, 0, 255, 0, 0, 0 }, @@ -329,6 +332,7 @@ static struct input_absinfo absinfo[] = { { 0x3f, 0, 255, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ TEST_DEVICE(LITEST_KEYBOARD_BLADE_STEALTH, .features = LITEST_KEYS | LITEST_WHEEL, diff --git a/test/litest-device-keyboard.c b/test/litest-device-keyboard.c index 828ec1e5..4552742d 100644 --- a/test/litest-device-keyboard.c +++ b/test/litest-device-keyboard.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x1, }; +/* clang-format off */ static int events[] = { EV_KEY, KEY_ESC, EV_KEY, KEY_1, @@ -190,6 +191,7 @@ static int events[] = { EV_LED, LED_SCROLLL, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_KEYBOARD, .features = LITEST_KEYS, diff --git a/test/litest-device-lenovo-scrollpoint.c b/test/litest-device-lenovo-scrollpoint.c index ae64f54f..589fe6ce 100644 --- a/test/litest-device-lenovo-scrollpoint.c +++ b/test/litest-device-lenovo-scrollpoint.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x3109, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -43,6 +44,7 @@ static int events[] = { EV_REL, REL_HWHEEL, -1 , -1, }; +/* clang-format on */ /* Note: device is not tagged with LITEST_WHEEL to avoid running the * "standard" wheel tests. Device has a custom wheel diff --git a/test/litest-device-lid-switch-surface3.c b/test/litest-device-lid-switch-surface3.c index b59090dc..ac96b2fe 100644 --- a/test/litest-device-lid-switch-surface3.c +++ b/test/litest-device-lid-switch-surface3.c @@ -33,10 +33,12 @@ static struct input_id input_id = { .product = 0x5, }; +/* clang-format off */ static int events[] = { EV_SW, SW_LID, -1, -1, }; +/* clang-format on */ static const char quirk_file[] = "[litest Surface Lid]\n" diff --git a/test/litest-device-lid-switch.c b/test/litest-device-lid-switch.c index 00b8d805..d4b61050 100644 --- a/test/litest-device-lid-switch.c +++ b/test/litest-device-lid-switch.c @@ -32,10 +32,12 @@ static struct input_id input_id = { .product = 0x5, }; +/* clang-format off */ static int events[] = { EV_SW, SW_LID, -1, -1, }; +/* clang-format on */ static const char quirk_file[] = "[litest Lid Switch]\n" diff --git a/test/litest-device-logitech-media-keyboard-elite.c b/test/litest-device-logitech-media-keyboard-elite.c index 889879d5..2dae5081 100644 --- a/test/litest-device-logitech-media-keyboard-elite.c +++ b/test/litest-device-logitech-media-keyboard-elite.c @@ -40,6 +40,7 @@ static struct input_id input_id = { .product = 0x30f, }; +/* clang-format off */ static int events[] = { EV_KEY, KEY_MUTE, EV_KEY, KEY_VOLUMEDOWN, @@ -79,6 +80,7 @@ static int events[] = { EV_MSC, MSC_SCAN, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_KEYBOARD_LOGITECH_MEDIA_KEYBOARD_ELITE, .features = LITEST_KEYS, diff --git a/test/litest-device-logitech-trackball.c b/test/litest-device-logitech-trackball.c index 9bebfd49..94ec14ab 100644 --- a/test/litest-device-logitech-trackball.c +++ b/test/litest-device-logitech-trackball.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0xc408, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -42,6 +43,7 @@ static int events[] = { EV_REL, REL_Y, -1 , -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_LOGITECH_TRACKBALL, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_TRACKBALL, diff --git a/test/litest-device-magic-trackpad.c b/test/litest-device-magic-trackpad.c index 3f68c524..91afc14c 100644 --- a/test/litest-device-magic-trackpad.c +++ b/test/litest-device-magic-trackpad.c @@ -74,6 +74,7 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, -2909, 3167, 4, 0, 46 }, { ABS_Y, -2456, 2565, 4, 0, 45 }, @@ -86,6 +87,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x5, @@ -93,6 +95,7 @@ static struct input_id input_id = { .product = 0x30e, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_TOOL_FINGER, @@ -104,6 +107,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_BUTTONPAD, -1, -1 }; +/* clang-format on */ TEST_DEVICE(LITEST_MAGIC_TRACKPAD, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | diff --git a/test/litest-device-mouse-low-dpi.c b/test/litest-device-mouse-low-dpi.c index 616e427b..a0fe4f50 100644 --- a/test/litest-device-mouse-low-dpi.c +++ b/test/litest-device-mouse-low-dpi.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x1, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -44,6 +45,7 @@ static int events[] = { EV_REL, REL_HWHEEL_HI_RES, -1 , -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_MOUSE_LOW_DPI, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, diff --git a/test/litest-device-mouse-roccat.c b/test/litest-device-mouse-roccat.c index 8ee1adbb..230f541f 100644 --- a/test/litest-device-mouse-roccat.c +++ b/test/litest-device-mouse-roccat.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x2e22, }; +/* clang-format off */ static int events[] = { EV_REL, REL_X, EV_REL, REL_Y, @@ -174,7 +175,9 @@ static int events[] = { EV_KEY, KEY_BRIGHTNESS_MAX, -1 , -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_VOLUME, 0, 572, 0, 0, 0 }, { ABS_MISC, 0, 0, 0, 0, 0 }, @@ -183,6 +186,7 @@ static struct input_absinfo absinfo[] = { { ABS_MISC + 3, 0, 0, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ TEST_DEVICE(LITEST_MOUSE_ROCCAT, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL | LITEST_KEYS, diff --git a/test/litest-device-mouse-virtual.c b/test/litest-device-mouse-virtual.c index 930521b8..7b0be757 100644 --- a/test/litest-device-mouse-virtual.c +++ b/test/litest-device-mouse-virtual.c @@ -30,11 +30,13 @@ static struct input_id input_id = { .product = 0x2, }; +/* clang-format off */ static int events[] = { EV_REL, REL_WHEEL, EV_REL, REL_WHEEL_HI_RES, -1, -1, }; +/* clang-format on */ static const char quirk_file[] = "[litest Virtual Mouse is virtual]\n" diff --git a/test/litest-device-mouse-wheel-click-angle.c b/test/litest-device-mouse-wheel-click-angle.c index 71ddec72..c90bbf57 100644 --- a/test/litest-device-mouse-wheel-click-angle.c +++ b/test/litest-device-mouse-wheel-click-angle.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x5678, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -41,6 +42,7 @@ static int events[] = { EV_REL, REL_WHEEL, -1 , -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_MOUSE_WHEEL_CLICK_ANGLE, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, diff --git a/test/litest-device-mouse-wheel-click-count.c b/test/litest-device-mouse-wheel-click-count.c index 24ee48e0..8da8acf0 100644 --- a/test/litest-device-mouse-wheel-click-count.c +++ b/test/litest-device-mouse-wheel-click-count.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x5678, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -41,6 +42,7 @@ static int events[] = { EV_REL, REL_WHEEL, -1 , -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_MOUSE_WHEEL_CLICK_COUNT, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, diff --git a/test/litest-device-mouse-wheel-tilt.c b/test/litest-device-mouse-wheel-tilt.c index ae8a51c6..56a0c936 100644 --- a/test/litest-device-mouse-wheel-tilt.c +++ b/test/litest-device-mouse-wheel-tilt.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x6019, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -42,6 +43,7 @@ static int events[] = { EV_REL, REL_HWHEEL, -1 , -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_MOUSE_WHEEL_TILT, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, diff --git a/test/litest-device-mouse.c b/test/litest-device-mouse.c index 3b456177..bc4bcaa2 100644 --- a/test/litest-device-mouse.c +++ b/test/litest-device-mouse.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x6019, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -42,6 +43,7 @@ static int events[] = { EV_REL, REL_WHEEL_HI_RES, -1 , -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_MOUSE, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL, diff --git a/test/litest-device-ms-nano-transceiver-mouse.c b/test/litest-device-ms-nano-transceiver-mouse.c index 5beac75b..dcd8b472 100644 --- a/test/litest-device-ms-nano-transceiver-mouse.c +++ b/test/litest-device-ms-nano-transceiver-mouse.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x0800, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -45,6 +46,7 @@ static int events[] = { EV_REL, REL_HWHEEL, -1 , -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_MS_NANO_TRANSCEIVER_MOUSE, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL | LITEST_NO_DEBOUNCE, diff --git a/test/litest-device-ms-surface-cover.c b/test/litest-device-ms-surface-cover.c index 0f2a1490..f75c1d13 100644 --- a/test/litest-device-ms-surface-cover.c +++ b/test/litest-device-ms-surface-cover.c @@ -52,6 +52,7 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1022, 0, 0, 12 }, { ABS_Y, 0, 487, 0, 0, 12 }, @@ -85,6 +86,7 @@ static struct input_absinfo absinfo[] = { { 62, -127, 127, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -92,6 +94,7 @@ static struct input_id input_id = { .product = 0x7dc, }; +/* clang-format off */ static int events[] = { EV_REL, REL_X, EV_REL, REL_Y, @@ -369,6 +372,7 @@ static int events[] = { EV_LED, LED_SCROLLL, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_MS_SURFACE_COVER, .features = LITEST_KEYS | LITEST_ABSOLUTE | LITEST_RELATIVE | LITEST_FAKE_MT | LITEST_BUTTON | LITEST_WHEEL, diff --git a/test/litest-device-nexus4-touch-screen.c b/test/litest-device-nexus4-touch-screen.c index 66693095..0f561673 100644 --- a/test/litest-device-nexus4-touch-screen.c +++ b/test/litest-device-nexus4-touch-screen.c @@ -52,6 +52,7 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1500, 0, 0, 0 }, { ABS_Y, 0, 2500, 0, 0, 0 }, @@ -63,6 +64,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x1, @@ -70,11 +72,13 @@ static struct input_id input_id = { .product = 0x26, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOUCH, INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1 }; +/* clang-format on */ TEST_DEVICE(LITEST_NEXUS4_TOUCH_SCREEN, .features = LITEST_TOUCH|LITEST_ELLIPSE, diff --git a/test/litest-device-protocol-a-touch-screen.c b/test/litest-device-protocol-a-touch-screen.c index 9889886b..08dcdcc4 100644 --- a/test/litest-device-protocol-a-touch-screen.c +++ b/test/litest-device-protocol-a-touch-screen.c @@ -180,6 +180,7 @@ static struct litest_device_interface interface = { .touch_up = protocolA_up, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 32767, 0, 0, 0 }, { ABS_Y, 0, 32767, 0, 0, 0 }, @@ -188,6 +189,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_PRESSURE, 0, 1, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x18, @@ -195,11 +197,13 @@ static struct input_id input_id = { .product = 0x20, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOUCH, INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_PROTOCOL_A_SCREEN, .features = LITEST_PROTOCOL_A|LITEST_TOUCH, diff --git a/test/litest-device-qemu-usb-tablet.c b/test/litest-device-qemu-usb-tablet.c index b3fd39d9..9f08613b 100644 --- a/test/litest-device-qemu-usb-tablet.c +++ b/test/litest-device-qemu-usb-tablet.c @@ -66,11 +66,13 @@ static struct litest_device_interface interface = { .touch_up = touch_up, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 32767, 0, 0, 0 }, { ABS_Y, 0, 32767, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x03, @@ -78,6 +80,7 @@ static struct input_id input_id = { .product = 0x01, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -85,6 +88,7 @@ static int events[] = { EV_REL, REL_WHEEL, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_QEMU_TABLET, .features = LITEST_WHEEL | LITEST_BUTTON | LITEST_ABSOLUTE, diff --git a/test/litest-device-sony-vaio-keys.c b/test/litest-device-sony-vaio-keys.c index 56ee63bc..e887ce9c 100644 --- a/test/litest-device-sony-vaio-keys.c +++ b/test/litest-device-sony-vaio-keys.c @@ -40,6 +40,7 @@ static struct input_id input_id = { .product = 0x00, }; +/* clang-format off */ static int events[] = { EV_KEY, KEY_UP, EV_KEY, KEY_DOWN, @@ -85,6 +86,7 @@ static int events[] = { EV_MSC, MSC_SCAN, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_SONY_VAIO_KEYS, .features = LITEST_KEYS, diff --git a/test/litest-device-synaptics-hover.c b/test/litest-device-synaptics-hover.c index d0e059a0..844860bc 100644 --- a/test/litest-device-synaptics-hover.c +++ b/test/litest-device-synaptics-hover.c @@ -78,6 +78,7 @@ static struct input_id input_id = { .product = 0x7, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -89,7 +90,9 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_SEMI_MT, -1, -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 1472, 5472, 0, 0, 60 }, { ABS_Y, 1408, 4498, 0, 0, 85 }, @@ -101,6 +104,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ TEST_DEVICE(LITEST_SYNAPTICS_HOVER_SEMI_MT, .features = LITEST_TOUCHPAD | LITEST_SEMI_MT | LITEST_BUTTON, diff --git a/test/litest-device-synaptics-i2c.c b/test/litest-device-synaptics-i2c.c index bd01ba54..540495ce 100644 --- a/test/litest-device-synaptics-i2c.c +++ b/test/litest-device-synaptics-i2c.c @@ -58,6 +58,7 @@ static struct input_id input_id = { .product = 0x76ad, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_TOOL_FINGER, @@ -68,7 +69,9 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_BUTTONPAD, -1, -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1216, 0, 0, 12 }, { ABS_Y, 0, 680, 0, 0, 12 }, @@ -78,6 +81,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ static const char quirk_file[] = "[litest Synaptics i2c Touchpad]\n" diff --git a/test/litest-device-synaptics-phantomclicks.c b/test/litest-device-synaptics-phantomclicks.c index b625e125..1b2074e1 100644 --- a/test/litest-device-synaptics-phantomclicks.c +++ b/test/litest-device-synaptics-phantomclicks.c @@ -58,6 +58,7 @@ static struct input_id input_id = { .product = 0x311c, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_TOOL_FINGER, @@ -70,7 +71,9 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_BUTTONPAD, -1, -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 4654, 0, 0, 31 }, { ABS_Y, 0, 2730, 0, 0, 31 }, @@ -81,6 +84,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ static const char quirk_file[] = "[litest Dell XPS 15 9500 Touchpad]\n" diff --git a/test/litest-device-synaptics-pressurepad.c b/test/litest-device-synaptics-pressurepad.c index 757acb18..ebb85572 100644 --- a/test/litest-device-synaptics-pressurepad.c +++ b/test/litest-device-synaptics-pressurepad.c @@ -86,6 +86,7 @@ static struct input_id input_id = { .product = 0xce37, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_TOOL_FINGER, @@ -98,7 +99,9 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_BUTTONPAD, -1, -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1224, 0, 0, 12 }, { ABS_Y, 0, 756, 0, 0, 12 }, @@ -111,6 +114,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TOOL_TYPE, 0, 2, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ TEST_DEVICE(LITEST_SYNAPTICS_PRESSUREPAD, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON, diff --git a/test/litest-device-synaptics-rmi4.c b/test/litest-device-synaptics-rmi4.c index 5643765c..dbdfb1ce 100644 --- a/test/litest-device-synaptics-rmi4.c +++ b/test/litest-device-synaptics-rmi4.c @@ -82,6 +82,7 @@ static struct input_id input_id = { .product = 0x0, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_TOOL_FINGER, @@ -94,7 +95,9 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_BUTTONPAD, -1, -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1940, 0, 0, 20 }, { ABS_Y, 0, 1062, 0, 0, 20 }, @@ -110,6 +113,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_PRESSURE, 0, 255, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ TEST_DEVICE(LITEST_SYNAPTICS_RMI4, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON, diff --git a/test/litest-device-synaptics-st.c b/test/litest-device-synaptics-st.c index 2bb944f6..e924520b 100644 --- a/test/litest-device-synaptics-st.c +++ b/test/litest-device-synaptics-st.c @@ -66,6 +66,7 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 1472, 5472, 0, 0, 75 }, { ABS_Y, 1408, 4448, 0, 0, 129 }, @@ -73,6 +74,7 @@ static struct input_absinfo absinfo[] = { { ABS_TOOL_WIDTH, 0, 15, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x11, @@ -80,6 +82,7 @@ static struct input_id input_id = { .product = 0x7, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -87,6 +90,7 @@ static int events[] = { EV_KEY, BTN_TOUCH, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_SYNAPTICS_TOUCHPAD, .features = LITEST_TOUCHPAD | LITEST_BUTTON | LITEST_SINGLE_TOUCH, diff --git a/test/litest-device-synaptics-t440.c b/test/litest-device-synaptics-t440.c index 5e489876..6b254282 100644 --- a/test/litest-device-synaptics-t440.c +++ b/test/litest-device-synaptics-t440.c @@ -76,6 +76,7 @@ static struct input_id input_id = { .product = 0x7, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_TOOL_FINGER, @@ -89,7 +90,9 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_TOPBUTTONPAD, -1, -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 1024, 5112, 0, 0, 42 }, { ABS_Y, 2024, 4832, 0, 0, 42 }, @@ -102,6 +105,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_PRESSURE, 0, 255, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ TEST_DEVICE(LITEST_SYNAPTICS_TOPBUTTONPAD, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON | LITEST_TOPBUTTONPAD, diff --git a/test/litest-device-synaptics-x1-carbon-3rd.c b/test/litest-device-synaptics-x1-carbon-3rd.c index 054ae606..fba220f7 100644 --- a/test/litest-device-synaptics-x1-carbon-3rd.c +++ b/test/litest-device-synaptics-x1-carbon-3rd.c @@ -76,6 +76,7 @@ static struct input_id input_id = { .product = 0x7, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_TOOL_FINGER, @@ -91,7 +92,9 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_BUTTONPAD, -1, -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 1266, 5676, 0, 0, 45 }, { ABS_Y, 1096, 4758, 0, 0, 68 }, @@ -104,6 +107,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_PRESSURE, 0, 255, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ static const char quirk_file[] = "[litest Synaptics X1 Carbon 3rd Touchpad]\n" diff --git a/test/litest-device-synaptics-x220.c b/test/litest-device-synaptics-x220.c index 037ba883..8abe19e5 100644 --- a/test/litest-device-synaptics-x220.c +++ b/test/litest-device-synaptics-x220.c @@ -76,6 +76,7 @@ static struct input_id input_id = { .product = 0x11, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_TOOL_FINGER, @@ -88,7 +89,9 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_BUTTONPAD, -1, -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 1472, 5472, 0, 0, 75 }, { ABS_Y, 1408, 4448, 0, 0, 129 }, @@ -101,6 +104,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_PRESSURE, 0, 255, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ TEST_DEVICE(LITEST_SYNAPTICS_CLICKPAD_X220, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON, diff --git a/test/litest-device-tablet-doubledial.c b/test/litest-device-tablet-doubledial.c index fa8210ea..c727dee3 100644 --- a/test/litest-device-tablet-doubledial.c +++ b/test/litest-device-tablet-doubledial.c @@ -39,12 +39,14 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1, 0, 0, 0 }, { ABS_Y, 0, 1, 0, 0, 0 }, { ABS_MISC, 0, 0, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -52,6 +54,7 @@ static struct input_id input_id = { .product = 0x678, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_0, EV_KEY, BTN_1, @@ -64,6 +67,7 @@ static int events[] = { EV_REL, REL_HWHEEL_HI_RES, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_TABLET_DOUBLEDIAL_PAD, .features = LITEST_TABLET_PAD | LITEST_DIAL, diff --git a/test/litest-device-tablet-mode-switch.c b/test/litest-device-tablet-mode-switch.c index c2c1e646..a8af6d5a 100644 --- a/test/litest-device-tablet-mode-switch.c +++ b/test/litest-device-tablet-mode-switch.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x456, }; +/* clang-format off */ static int events[] = { /* buttons are needed - the unreliable quirk removes SW_TABLET_MODE * so we'd end up with a device with no seat caps and that won't get @@ -41,6 +42,7 @@ static int events[] = { EV_SW, SW_TABLET_MODE, -1, -1, }; +/* clang-format on */ static const char quirk_file[] = "[litest unreliable tablet mode switch]\n" diff --git a/test/litest-device-tablet-rel-dial.c b/test/litest-device-tablet-rel-dial.c index 1bb81009..519683b5 100644 --- a/test/litest-device-tablet-rel-dial.c +++ b/test/litest-device-tablet-rel-dial.c @@ -39,12 +39,14 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1, 0, 0, 0 }, { ABS_Y, 0, 1, 0, 0, 0 }, { ABS_MISC, 0, 0, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -52,6 +54,7 @@ static struct input_id input_id = { .product = 0x456, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_0, EV_KEY, BTN_1, @@ -61,6 +64,7 @@ static int events[] = { EV_REL, REL_DIAL, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_TABLET_REL_DIAL_PAD, .features = LITEST_TABLET_PAD | LITEST_DIAL, diff --git a/test/litest-device-thinkpad-extrabuttons.c b/test/litest-device-thinkpad-extrabuttons.c index ad773952..26f7bf58 100644 --- a/test/litest-device-thinkpad-extrabuttons.c +++ b/test/litest-device-thinkpad-extrabuttons.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x5054, }; +/* clang-format off */ static int events[] = { EV_KEY, KEY_MUTE, EV_KEY, KEY_VOLUMEUP, @@ -69,6 +70,7 @@ static int events[] = { -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_THINKPAD_EXTRABUTTONS, .features = LITEST_KEYS | LITEST_SWITCH, diff --git a/test/litest-device-touch-screen.c b/test/litest-device-touch-screen.c index 7baa05f6..09366654 100644 --- a/test/litest-device-touch-screen.c +++ b/test/litest-device-touch-screen.c @@ -56,6 +56,7 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 50000, 0, 0, 100 }, { ABS_Y, 0, 33000, 0, 0, 100 }, @@ -69,6 +70,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x1, @@ -76,11 +78,13 @@ static struct input_id input_id = { .product = 0x25, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOUCH, INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1 }; +/* clang-format on */ TEST_DEVICE(LITEST_GENERIC_MULTITOUCH_SCREEN, .features = LITEST_TOUCH|LITEST_ELLIPSE, diff --git a/test/litest-device-touchpad-palm-threshold-zero.c b/test/litest-device-touchpad-palm-threshold-zero.c index 75139aa2..d3f690ba 100644 --- a/test/litest-device-touchpad-palm-threshold-zero.c +++ b/test/litest-device-touchpad-palm-threshold-zero.c @@ -76,6 +76,7 @@ static struct input_id input_id = { .product = 0x7, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_TOOL_FINGER, @@ -91,7 +92,9 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_BUTTONPAD, -1, -1, }; +/* clang-format on */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 1266, 5676, 0, 0, 45 }, { ABS_Y, 1096, 4758, 0, 0, 68 }, @@ -104,6 +107,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_PRESSURE, 0, 255, 0, 0, 0 }, { .value = -1 } }; +/* clang-format on */ static const char quirk_file[] = "[litest TouchpadPalmPressure Zero]\n" diff --git a/test/litest-device-touchscreen-fuzz.c b/test/litest-device-touchscreen-fuzz.c index 9510ca5a..99f30ba0 100644 --- a/test/litest-device-touchscreen-fuzz.c +++ b/test/litest-device-touchscreen-fuzz.c @@ -50,6 +50,7 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1500, 10, 0, 0 }, { ABS_Y, 0, 2500, 12, 0, 0 }, @@ -60,6 +61,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x1, @@ -67,11 +69,13 @@ static struct input_id input_id = { .product = 0x25, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOUCH, INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1 }; +/* clang-format on */ TEST_DEVICE(LITEST_MULTITOUCH_FUZZ_SCREEN, .features = LITEST_TOUCH, diff --git a/test/litest-device-touchscreen-invalid-range.c b/test/litest-device-touchscreen-invalid-range.c index b0c2613c..1c06c410 100644 --- a/test/litest-device-touchscreen-invalid-range.c +++ b/test/litest-device-touchscreen-invalid-range.c @@ -51,6 +51,7 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 1000, 2500, 0, 0, 10 }, { ABS_Y, 2000, 4500, 0, 0, 10 }, @@ -60,6 +61,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x1, @@ -67,11 +69,13 @@ static struct input_id input_id = { .product = 0x25, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOUCH, INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1 }; +/* clang-format on */ TEST_DEVICE(LITEST_TOUCHSCREEN_INVALID_RANGE, .features = LITEST_TOUCH, diff --git a/test/litest-device-touchscreen-mt-tool.c b/test/litest-device-touchscreen-mt-tool.c index f727b2ce..9682db2a 100644 --- a/test/litest-device-touchscreen-mt-tool.c +++ b/test/litest-device-touchscreen-mt-tool.c @@ -53,6 +53,7 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 1000, 2500, 0, 0, 10 }, { ABS_Y, 2000, 4500, 0, 0, 10 }, @@ -63,6 +64,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x1, @@ -70,11 +72,13 @@ static struct input_id input_id = { .product = 0x25, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOUCH, INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1 }; +/* clang-format on */ TEST_DEVICE(LITEST_TOUCHSCREEN_MT_TOOL_TYPE, .features = LITEST_TOUCH, diff --git a/test/litest-device-trackpoint.c b/test/litest-device-trackpoint.c index 4a40f0b3..b2ea3df4 100644 --- a/test/litest-device-trackpoint.c +++ b/test/litest-device-trackpoint.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0xa, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -42,6 +43,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_POINTING_STICK, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_TRACKPOINT, .features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_POINTINGSTICK, diff --git a/test/litest-device-uclogic-tablet.c b/test/litest-device-uclogic-tablet.c index 6bfd2239..515bd035 100644 --- a/test/litest-device-uclogic-tablet.c +++ b/test/litest-device-uclogic-tablet.c @@ -72,12 +72,14 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 32767, 0, 0, 235 }, { ABS_Y, 0, 32767, 0, 0, 323 }, { ABS_PRESSURE, 0, 1023, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -86,6 +88,7 @@ static struct input_id input_id = { .product = 0x6e, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOUCH, EV_KEY, BTN_STYLUS, @@ -93,6 +96,7 @@ static int events[] = { EV_MSC, MSC_SCAN, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_UCLOGIC_TABLET, .features = LITEST_TABLET | LITEST_HOVER | LITEST_FORCED_PROXOUT, diff --git a/test/litest-device-vmware-virtual-usb-mouse.c b/test/litest-device-vmware-virtual-usb-mouse.c index 87beccc3..2b7dc70c 100644 --- a/test/litest-device-vmware-virtual-usb-mouse.c +++ b/test/litest-device-vmware-virtual-usb-mouse.c @@ -66,11 +66,13 @@ static struct litest_device_interface interface = { .touch_up = touch_up, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 32767, 0, 0, 0 }, { ABS_Y, 0, 32767, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x03, @@ -78,6 +80,7 @@ static struct input_id input_id = { .product = 0x03, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -99,6 +102,7 @@ static int events[] = { EV_REL, REL_HWHEEL, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_VMWARE_VIRTMOUSE, .features = LITEST_WHEEL | LITEST_BUTTON | LITEST_ABSOLUTE | LITEST_NO_DEBOUNCE, diff --git a/test/litest-device-wacom-bamboo-16fg-pen.c b/test/litest-device-wacom-bamboo-16fg-pen.c index 78ba0c86..73ba11c5 100644 --- a/test/litest-device-wacom-bamboo-16fg-pen.c +++ b/test/litest-device-wacom-bamboo-16fg-pen.c @@ -77,6 +77,7 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 14720, 4, 0, 100 }, { ABS_Y, 0, 9200, 4, 0, 100 }, @@ -84,6 +85,7 @@ static struct input_absinfo absinfo[] = { { ABS_DISTANCE, 0, 31, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -92,6 +94,7 @@ static struct input_id input_id = { .version = 0x100, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOOL_PEN, EV_KEY, BTN_TOOL_RUBBER, @@ -101,6 +104,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_POINTER, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_BAMBOO_16FG_PEN, .features = LITEST_TABLET | LITEST_DISTANCE | LITEST_HOVER, diff --git a/test/litest-device-wacom-bamboo-2fg-finger.c b/test/litest-device-wacom-bamboo-2fg-finger.c index fcb10289..1c27733e 100644 --- a/test/litest-device-wacom-bamboo-2fg-finger.c +++ b/test/litest-device-wacom-bamboo-2fg-finger.c @@ -52,6 +52,7 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 15360, 0, 0, 128 }, { ABS_Y, 0, 10240, 0, 0, 128 }, @@ -62,6 +63,7 @@ static struct input_absinfo absinfo[] = { { ABS_MISC, 0, 0, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -70,6 +72,7 @@ static struct input_id input_id = { .version = 0x110, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOOL_FINGER, EV_KEY, BTN_TOUCH, @@ -77,6 +80,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_POINTER, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_BAMBOO_2FG_FINGER, .features = LITEST_TOUCHPAD, diff --git a/test/litest-device-wacom-bamboo-2fg-pad.c b/test/litest-device-wacom-bamboo-2fg-pad.c index 782ef41e..c4c84dea 100644 --- a/test/litest-device-wacom-bamboo-2fg-pad.c +++ b/test/litest-device-wacom-bamboo-2fg-pad.c @@ -39,11 +39,13 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1, 0, 0, 0 }, { ABS_Y, 0, 1, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -52,6 +54,7 @@ static struct input_id input_id = { .version = 0x100, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -60,6 +63,7 @@ static int events[] = { EV_KEY, BTN_STYLUS, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_BAMBOO_2FG_PAD, .features = LITEST_TABLET_PAD, diff --git a/test/litest-device-wacom-bamboo-2fg-pen.c b/test/litest-device-wacom-bamboo-2fg-pen.c index e146a57a..9dd4090f 100644 --- a/test/litest-device-wacom-bamboo-2fg-pen.c +++ b/test/litest-device-wacom-bamboo-2fg-pen.c @@ -77,6 +77,7 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 14720, 4, 0, 100 }, { ABS_Y, 0, 9200, 4, 0, 100 }, @@ -84,6 +85,7 @@ static struct input_absinfo absinfo[] = { { ABS_DISTANCE, 0, 31, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -92,6 +94,7 @@ static struct input_id input_id = { .version = 0x100, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOOL_PEN, EV_KEY, BTN_TOOL_RUBBER, @@ -101,6 +104,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_POINTER, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_BAMBOO_2FG_PEN, .features = LITEST_TABLET | LITEST_DISTANCE | LITEST_HOVER, diff --git a/test/litest-device-wacom-calibrated-tablet.c b/test/litest-device-wacom-calibrated-tablet.c index 27dc2726..9bd39892 100644 --- a/test/litest-device-wacom-calibrated-tablet.c +++ b/test/litest-device-wacom-calibrated-tablet.c @@ -101,12 +101,14 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 29476, 4, 0, 100 }, { ABS_Y, 0, 16624, 4, 0, 100 }, { ABS_PRESSURE, 0, 1023, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -115,6 +117,7 @@ static struct input_id input_id = { .version = 0x111, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOOL_PEN, EV_KEY, BTN_TOOL_RUBBER, @@ -124,6 +127,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_CALIBRATED_TABLET_PEN, .features = LITEST_TABLET|LITEST_PRECALIBRATED, diff --git a/test/litest-device-wacom-cintiq-12wx-pen.c b/test/litest-device-wacom-cintiq-12wx-pen.c index d9df66f6..31f9609c 100644 --- a/test/litest-device-wacom-cintiq-12wx-pen.c +++ b/test/litest-device-wacom-cintiq-12wx-pen.c @@ -92,6 +92,7 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 53020, 4, 0, 200 }, { ABS_Y, 0, 33440, 4, 0, 200 }, @@ -106,6 +107,7 @@ static struct input_absinfo absinfo[] = { { ABS_MISC, 0, 0, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -114,6 +116,7 @@ static struct input_id input_id = { .version = 0x113, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_0, EV_KEY, BTN_1, @@ -137,6 +140,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_CINTIQ_12WX_PEN, .features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | LITEST_TILT | LITEST_DIRECT | LITEST_HOVER, diff --git a/test/litest-device-wacom-cintiq-13hdt-finger.c b/test/litest-device-wacom-cintiq-13hdt-finger.c index 81748f84..af67b630 100644 --- a/test/litest-device-wacom-cintiq-13hdt-finger.c +++ b/test/litest-device-wacom-cintiq-13hdt-finger.c @@ -53,6 +53,7 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 2937, 0, 0, 10 }, { ABS_Y, 0, 1652, 0, 0, 10 }, @@ -67,6 +68,7 @@ static struct input_absinfo absinfo[] = { { ABS_MISC, 0, 0, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -75,11 +77,13 @@ static struct input_id input_id = { .version = 0x110, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOUCH, INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_CINTIQ_13HDT_FINGER, .features = LITEST_TOUCH, diff --git a/test/litest-device-wacom-cintiq-13hdt-pad.c b/test/litest-device-wacom-cintiq-13hdt-pad.c index 3afc20b5..b6fa69c3 100644 --- a/test/litest-device-wacom-cintiq-13hdt-pad.c +++ b/test/litest-device-wacom-cintiq-13hdt-pad.c @@ -61,6 +61,7 @@ static struct litest_device_interface interface = { .pad_ring_change_events = ring_change, .pad_ring_end_events = ring_end, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1, 0, 0, 0 }, { ABS_Y, 0, 1, 0, 0, 0 }, @@ -68,6 +69,7 @@ static struct input_absinfo absinfo[] = { { ABS_MISC, 0, 0, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -76,6 +78,7 @@ static struct input_id input_id = { .version = 0x110, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_0, EV_KEY, BTN_1, @@ -89,6 +92,7 @@ static int events[] = { EV_KEY, BTN_STYLUS, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_CINTIQ_13HDT_PAD, .features = LITEST_TABLET_PAD | LITEST_RING, diff --git a/test/litest-device-wacom-cintiq-13hdt-pen.c b/test/litest-device-wacom-cintiq-13hdt-pen.c index fb61694b..f528d8d3 100644 --- a/test/litest-device-wacom-cintiq-13hdt-pen.c +++ b/test/litest-device-wacom-cintiq-13hdt-pen.c @@ -92,6 +92,7 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 400, 59152, 4, 0, 200 }, { ABS_Y, 400, 33448, 4, 0, 200 }, @@ -105,6 +106,7 @@ static struct input_absinfo absinfo[] = { { ABS_MISC, 0, 0, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -113,6 +115,7 @@ static struct input_id input_id = { .version = 0x110, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOOL_PEN, EV_KEY, BTN_TOOL_RUBBER, @@ -126,6 +129,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_CINTIQ_13HDT_PEN, .features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | LITEST_TILT | LITEST_DIRECT | LITEST_HOVER, diff --git a/test/litest-device-wacom-cintiq-24hd-pen.c b/test/litest-device-wacom-cintiq-24hd-pen.c index 299ad96a..41643cac 100644 --- a/test/litest-device-wacom-cintiq-24hd-pen.c +++ b/test/litest-device-wacom-cintiq-24hd-pen.c @@ -92,6 +92,7 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 400, 104080, 4, 0, 200 }, { ABS_Y, 400, 65200, 4, 0, 200 }, @@ -105,6 +106,7 @@ static struct input_absinfo absinfo[] = { { ABS_MISC, 0, 0, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -113,6 +115,7 @@ static struct input_id input_id = { .version = 0x113, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOOL_PEN, EV_KEY, BTN_TOOL_RUBBER, @@ -126,6 +129,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_CINTIQ_24HD_PEN, .features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | LITEST_TILT | LITEST_DIRECT | LITEST_HOVER, diff --git a/test/litest-device-wacom-cintiq-24hdt-pad.c b/test/litest-device-wacom-cintiq-24hdt-pad.c index 3b1bd170..3a674717 100644 --- a/test/litest-device-wacom-cintiq-24hdt-pad.c +++ b/test/litest-device-wacom-cintiq-24hdt-pad.c @@ -73,6 +73,8 @@ static struct litest_device_interface interface = { .pad_ring_end_events = ring_end, }; +/* clang-format off */ +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1, 0, 0, 0 }, { ABS_Y, 0, 1, 0, 0, 0 }, @@ -81,6 +83,8 @@ static struct input_absinfo absinfo[] = { { ABS_MISC, 0, 0, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -89,6 +93,7 @@ static struct input_id input_id = { .version = 0x110, }; +/* clang-format off */ static int events[] = { EV_KEY, KEY_PROG1, EV_KEY, KEY_PROG2, @@ -112,6 +117,7 @@ static int events[] = { EV_KEY, BTN_STYLUS, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_CINTIQ_24HDT_PAD, .features = LITEST_TABLET_PAD | LITEST_RING, diff --git a/test/litest-device-wacom-cintiq-pro-16-finger.c b/test/litest-device-wacom-cintiq-pro-16-finger.c index 1d7faa4a..5426edb3 100644 --- a/test/litest-device-wacom-cintiq-pro-16-finger.c +++ b/test/litest-device-wacom-cintiq-pro-16-finger.c @@ -53,6 +53,7 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 13824, 0, 0, 40 }, { ABS_Y, 0, 7776, 0, 0, 40 }, @@ -66,6 +67,7 @@ static struct input_absinfo absinfo[] = { { ABS_MISC, 0, 0, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -74,11 +76,13 @@ static struct input_id input_id = { .version = 0xb, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOUCH, INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_CINTIQ_PRO16_FINGER, .features = LITEST_TOUCH, diff --git a/test/litest-device-wacom-cintiq-pro-16-pad.c b/test/litest-device-wacom-cintiq-pro-16-pad.c index d2259cc1..19be9cb6 100644 --- a/test/litest-device-wacom-cintiq-pro-16-pad.c +++ b/test/litest-device-wacom-cintiq-pro-16-pad.c @@ -38,12 +38,14 @@ static struct litest_device_interface interface = { .touch_down_events = down, .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1, 0, 0, 0 }, { ABS_Y, 0, 1, 0, 0, 0 }, { ABS_MISC, 0, 0, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -52,6 +54,7 @@ static struct input_id input_id = { .version = 0xb, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_STYLUS, EV_KEY, KEY_BUTTONCONFIG, @@ -59,6 +62,7 @@ static int events[] = { EV_KEY, KEY_ONSCREEN_KEYBOARD, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_CINTIQ_PRO16_PAD, .features = LITEST_TABLET_PAD, diff --git a/test/litest-device-wacom-cintiq-pro-16-pen.c b/test/litest-device-wacom-cintiq-pro-16-pen.c index 77144f43..a28789e4 100644 --- a/test/litest-device-wacom-cintiq-pro-16-pen.c +++ b/test/litest-device-wacom-cintiq-pro-16-pen.c @@ -99,6 +99,7 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 69920, 0, 0, 200 }, { ABS_Y, 0, 39980, 0, 0, 200 }, @@ -111,6 +112,7 @@ static struct input_absinfo absinfo[] = { { ABS_MISC, 0, 0, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -119,6 +121,7 @@ static struct input_id input_id = { .version = 0xb, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOOL_PEN, EV_KEY, BTN_TOOL_RUBBER, @@ -133,6 +136,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_CINTIQ_PRO16_PEN, .features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | LITEST_TILT | LITEST_DIRECT | LITEST_HOVER, diff --git a/test/litest-device-wacom-ekr.c b/test/litest-device-wacom-ekr.c index 060f5965..1a279462 100644 --- a/test/litest-device-wacom-ekr.c +++ b/test/litest-device-wacom-ekr.c @@ -62,6 +62,7 @@ static struct litest_device_interface interface = { .pad_ring_end_events = ring_end, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1, 0, 0, 0 }, { ABS_Y, 0, 1, 0, 0, 0 }, @@ -69,6 +70,7 @@ static struct input_absinfo absinfo[] = { { ABS_MISC, 0, 0, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -76,6 +78,7 @@ static struct input_id input_id = { .product = 0x331, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_0, EV_KEY, BTN_1, @@ -99,6 +102,7 @@ static int events[] = { EV_KEY, BTN_STYLUS, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_EKR, .features = LITEST_TABLET_PAD | LITEST_RING, diff --git a/test/litest-device-wacom-hid4800-pen.c b/test/litest-device-wacom-hid4800-pen.c index 12b7d598..bf9964d0 100644 --- a/test/litest-device-wacom-hid4800-pen.c +++ b/test/litest-device-wacom-hid4800-pen.c @@ -74,12 +74,14 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 21696, 4, 0, 100 }, { ABS_Y, 0, 13560, 4, 0, 100 }, { ABS_PRESSURE, 0, 2047, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x18, @@ -88,6 +90,7 @@ static struct input_id input_id = { .version = 0x100, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOOL_PEN, EV_KEY, BTN_TOOL_RUBBER, @@ -98,6 +101,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_HID4800_PEN, .features = LITEST_TABLET | LITEST_HOVER, diff --git a/test/litest-device-wacom-intuos3-pad.c b/test/litest-device-wacom-intuos3-pad.c index 237b8e28..eb2744a5 100644 --- a/test/litest-device-wacom-intuos3-pad.c +++ b/test/litest-device-wacom-intuos3-pad.c @@ -62,6 +62,7 @@ static struct litest_device_interface interface = { .pad_strip_end_events = strip_end, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1, 0, 0, 0 }, { ABS_Y, 0, 1, 0, 0, 0 }, @@ -69,6 +70,7 @@ static struct input_absinfo absinfo[] = { { ABS_MISC, 0, 0, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -76,6 +78,7 @@ static struct input_id input_id = { .product = 0xb7, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_0, EV_KEY, BTN_1, @@ -84,6 +87,7 @@ static int events[] = { EV_KEY, BTN_STYLUS, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_INTUOS3_PAD, .features = LITEST_TABLET_PAD | LITEST_STRIP, diff --git a/test/litest-device-wacom-intuos5-finger.c b/test/litest-device-wacom-intuos5-finger.c index 412b3ee3..50e20f93 100644 --- a/test/litest-device-wacom-intuos5-finger.c +++ b/test/litest-device-wacom-intuos5-finger.c @@ -74,6 +74,7 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 4096, 0, 0, 18 }, { ABS_Y, 0, 4096, 0, 0, 29 }, @@ -85,6 +86,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -92,6 +94,7 @@ static struct input_id input_id = { .product = 0x27, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOOL_FINGER, EV_KEY, BTN_TOOL_QUINTTAP, @@ -102,6 +105,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_POINTER, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_INTUOS5_FINGER, .features = LITEST_TOUCHPAD, diff --git a/test/litest-device-wacom-intuos5-pad.c b/test/litest-device-wacom-intuos5-pad.c index 12cf66d4..cee44de2 100644 --- a/test/litest-device-wacom-intuos5-pad.c +++ b/test/litest-device-wacom-intuos5-pad.c @@ -62,6 +62,7 @@ static struct litest_device_interface interface = { .pad_ring_end_events = ring_end, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 1, 0, 0, 0 }, { ABS_Y, 0, 1, 0, 0, 0 }, @@ -69,6 +70,7 @@ static struct input_absinfo absinfo[] = { { ABS_MISC, 0, 0, 0, 0, 10 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -76,6 +78,7 @@ static struct input_id input_id = { .product = 0x27, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_0, EV_KEY, BTN_1, @@ -89,6 +92,7 @@ static int events[] = { EV_KEY, BTN_STYLUS, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_INTUOS5_PAD, .features = LITEST_TABLET_PAD | LITEST_RING, diff --git a/test/litest-device-wacom-intuos5-pen.c b/test/litest-device-wacom-intuos5-pen.c index adb25377..c2242127 100644 --- a/test/litest-device-wacom-intuos5-pen.c +++ b/test/litest-device-wacom-intuos5-pen.c @@ -92,6 +92,7 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 44704, 4, 0, 200 }, { ABS_Y, 0, 27940, 4, 0, 200 }, @@ -105,6 +106,7 @@ static struct input_absinfo absinfo[] = { { ABS_MISC, 0, 0, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -112,6 +114,7 @@ static struct input_id input_id = { .product = 0x27, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_0, EV_KEY, BTN_1, @@ -142,6 +145,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_POINTER, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_INTUOS5_PEN, .features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | LITEST_TILT | LITEST_TOOL_MOUSE | LITEST_HOVER, diff --git a/test/litest-device-wacom-isdv4-4200-pen.c b/test/litest-device-wacom-isdv4-4200-pen.c index 092fc315..9d48e311 100644 --- a/test/litest-device-wacom-isdv4-4200-pen.c +++ b/test/litest-device-wacom-isdv4-4200-pen.c @@ -72,6 +72,7 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 59674, 0, 0, 100 }, { ABS_Y, 0, 33566, 0, 0, 100 }, @@ -81,6 +82,7 @@ static struct input_absinfo absinfo[] = { { ABS_PRESSURE, 0, 4096, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -88,6 +90,7 @@ static struct input_id input_id = { .product = 0x4200, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOOL_PEN, EV_KEY, BTN_TOOL_RUBBER, @@ -98,6 +101,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_ISDV4_4200_PEN, .features = LITEST_TABLET|LITEST_HOVER, diff --git a/test/litest-device-wacom-isdv4-524c-pen.c b/test/litest-device-wacom-isdv4-524c-pen.c index b40536cd..a98e0ff9 100644 --- a/test/litest-device-wacom-isdv4-524c-pen.c +++ b/test/litest-device-wacom-isdv4-524c-pen.c @@ -127,6 +127,7 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 30931, 0, 0, 100 }, { ABS_Y, 0, 17399, 0, 0, 100 }, @@ -136,6 +137,7 @@ static struct input_absinfo absinfo[] = { { ABS_PRESSURE, 0, 4095, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -143,6 +145,7 @@ static struct input_id input_id = { .product = 0x524c, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOOL_PEN, EV_KEY, BTN_TOOL_RUBBER, @@ -152,6 +155,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_ISDV4_524C_PEN, .features = LITEST_TABLET|LITEST_HOVER, diff --git a/test/litest-device-wacom-isdv4-e6-finger.c b/test/litest-device-wacom-isdv4-e6-finger.c index b42d1944..ae5a8d86 100644 --- a/test/litest-device-wacom-isdv4-e6-finger.c +++ b/test/litest-device-wacom-isdv4-e6-finger.c @@ -54,6 +54,7 @@ static struct litest_device_interface interface = { .touch_move_events = move, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 2776, 0, 0, 10 }, { ABS_Y, 0, 1569, 0, 0, 9 }, @@ -63,6 +64,7 @@ static struct input_absinfo absinfo[] = { { ABS_MT_TRACKING_ID, 0, 65535, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -70,11 +72,13 @@ static struct input_id input_id = { .product = 0xe6, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOUCH, INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_ISDV4_E6_FINGER, .features = LITEST_TOUCH, diff --git a/test/litest-device-wacom-isdv4-e6-pen.c b/test/litest-device-wacom-isdv4-e6-pen.c index 007d464a..acb1f3b2 100644 --- a/test/litest-device-wacom-isdv4-e6-pen.c +++ b/test/litest-device-wacom-isdv4-e6-pen.c @@ -69,12 +69,14 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 27760, 4, 0, 100 }, { ABS_Y, 0, 15694, 4, 0, 100 }, { ABS_PRESSURE, 0, 255, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -82,6 +84,7 @@ static struct input_id input_id = { .product = 0xe6, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_TOOL_PEN, EV_KEY, BTN_TOOL_RUBBER, @@ -91,6 +94,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_DIRECT, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_ISDV4_E6_PEN, .features = LITEST_TABLET | LITEST_HOVER, diff --git a/test/litest-device-wacom-mobilestudio-pro-pad.c b/test/litest-device-wacom-mobilestudio-pro-pad.c index 7cd3daa6..656fd890 100644 --- a/test/litest-device-wacom-mobilestudio-pro-pad.c +++ b/test/litest-device-wacom-mobilestudio-pro-pad.c @@ -61,6 +61,7 @@ static struct litest_device_interface interface = { .pad_ring_change_events = ring_change, .pad_ring_end_events = ring_end, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, -2048, 2048, 0, 0, 0 }, { ABS_Y, -2048, 2048, 0, 0, 0 }, @@ -69,6 +70,7 @@ static struct input_absinfo absinfo[] = { { ABS_MISC, 0, 0, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -77,6 +79,7 @@ static struct input_id input_id = { .version = 0x110, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_0, EV_KEY, BTN_1, @@ -95,6 +98,7 @@ static int events[] = { INPUT_PROP_MAX, INPUT_PROP_ACCELEROMETER, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WACOM_MOBILESTUDIO_PRO_16_PAD, .features = LITEST_TABLET_PAD | LITEST_RING, diff --git a/test/litest-device-waltop-tablet.c b/test/litest-device-waltop-tablet.c index 343f1295..136eb8b6 100644 --- a/test/litest-device-waltop-tablet.c +++ b/test/litest-device-waltop-tablet.c @@ -80,6 +80,7 @@ static struct litest_device_interface interface = { .get_axis_default = get_axis_default, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 32000, 0, 0, 0 }, { ABS_Y, 0, 32000, 0, 0, 0 }, @@ -88,6 +89,7 @@ static struct input_absinfo absinfo[] = { { ABS_TILT_Y, -127, 127, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x3, @@ -95,6 +97,7 @@ static struct input_id input_id = { .product = 0x509, }; +/* clang-format off */ static int events[] = { EV_KEY, KEY_ESC, EV_KEY, KEY_1, @@ -219,6 +222,7 @@ static int events[] = { EV_MSC, MSC_SERIAL, -1, -1, }; +/* clang-format on */ static const char quirk_file[] = "[litest Waltop Tablet]\n" diff --git a/test/litest-device-wheel-only.c b/test/litest-device-wheel-only.c index 7071a544..105af9c8 100644 --- a/test/litest-device-wheel-only.c +++ b/test/litest-device-wheel-only.c @@ -32,10 +32,12 @@ static struct input_id input_id = { .product = 0x2, }; +/* clang-format off */ static int events[] = { EV_REL, REL_WHEEL, -1 , -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_WHEEL_ONLY, .features = LITEST_WHEEL, diff --git a/test/litest-device-xen-virtual-pointer.c b/test/litest-device-xen-virtual-pointer.c index 5034c9b3..d67d685c 100644 --- a/test/litest-device-xen-virtual-pointer.c +++ b/test/litest-device-xen-virtual-pointer.c @@ -66,11 +66,13 @@ static struct litest_device_interface interface = { .touch_up = touch_up, }; +/* clang-format off */ static struct input_absinfo absinfo[] = { { ABS_X, 0, 800, 0, 0, 0 }, { ABS_Y, 0, 800, 0, 0, 0 }, { .value = -1 }, }; +/* clang-format on */ static struct input_id input_id = { .bustype = 0x01, @@ -78,6 +80,7 @@ static struct input_id input_id = { .product = 0xfffe, }; +/* clang-format off */ static int events[] = { EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -90,6 +93,7 @@ static int events[] = { EV_REL, REL_WHEEL, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_XEN_VIRTUAL_POINTER, .features = LITEST_WHEEL | LITEST_BUTTON | LITEST_ABSOLUTE, diff --git a/test/litest-device-yubikey.c b/test/litest-device-yubikey.c index e010796d..716d9b6c 100644 --- a/test/litest-device-yubikey.c +++ b/test/litest-device-yubikey.c @@ -32,6 +32,7 @@ static struct input_id input_id = { .product = 0x10, }; +/* clang-format off */ static int events[] = { EV_KEY, KEY_ESC, EV_KEY, KEY_1, @@ -146,6 +147,7 @@ static int events[] = { EV_LED, LED_KANA, -1, -1, }; +/* clang-format on */ TEST_DEVICE(LITEST_YUBIKEY, .features = LITEST_KEYS, diff --git a/test/litest-selftest.c b/test/litest-selftest.c index 5d6f0f2f..f6135d84 100644 --- a/test/litest-selftest.c +++ b/test/litest-selftest.c @@ -481,10 +481,12 @@ START_TEST(parameter_permutations) { 3, "abc", false }, { 0, NULL, false, false }, }; + /* clang-format off */ struct litest_parameters *params = litest_parameters_new("first", 'i', 3, 1, 2, 3, "second", 's', 3, "a", "ab", "abc", "third", 'b', NULL); + /* clang-format on */ litest_parameters_permutations(params, permutation_func, permutations); diff --git a/test/test-device.c b/test/test-device.c index c55e8512..6322c183 100644 --- a/test/test-device.c +++ b/test/test-device.c @@ -847,12 +847,14 @@ START_TEST(device_group_leak) struct libevdev_uinput *uinput; struct libinput_device_group *group; + /* clang-format off */ uinput = litest_create_uinput_device("test device", NULL, EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, EV_REL, REL_X, EV_REL, REL_Y, -1); + /* clang-format on */ _litest_context_destroy_ struct libinput *li = litest_create_context(); device = libinput_path_add_device(li, @@ -876,11 +878,13 @@ START_TEST(abs_device_missing_one_abs) int axis = litest_test_param_get_i32(test_env->params, "axis"); + /* clang-format off */ uinput = litest_create_uinput_device("test device", NULL, EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, EV_ABS, axis, -1); + /* clang-format on */ _litest_context_destroy_ struct libinput *li = litest_create_context(); litest_disable_log_handler(li); device = libinput_path_add_device(li, @@ -898,6 +902,7 @@ START_TEST(abs_mt_device_missing_one_mt_abs) struct libinput_device *device; int axis = litest_test_param_get_i32(test_env->params, "axis"); + /* clang-format off */ uinput = litest_create_uinput_device("test device", NULL, EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -906,6 +911,7 @@ START_TEST(abs_mt_device_missing_one_mt_abs) EV_ABS, ABS_MT_SLOT, EV_ABS, axis, -1); + /* clang-format on */ _litest_context_destroy_ struct libinput *li = litest_create_context(); litest_disable_log_handler(li); device = libinput_path_add_device(li, @@ -923,11 +929,13 @@ assert_device_ignored(struct libinput *li, struct input_absinfo *absinfo) struct libevdev_uinput *uinput; struct libinput_device *device; + /* clang-format off */ uinput = litest_create_uinput_abs_device("test device", NULL, absinfo, EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, -1); + /* clang-format on */ device = libinput_path_add_device(li, libevdev_uinput_get_devnode(uinput)); litest_assert_ptr_null(device); @@ -1052,11 +1060,13 @@ START_TEST(ignore_joystick) litest_disable_log_handler(li); litest_drain_events(li); + /* clang-format off */ uinput = litest_create_uinput_abs_device("joystick test device", NULL, absinfo, EV_KEY, BTN_TRIGGER, EV_KEY, BTN_A, -1); + /* clang-format on */ device = libinput_path_add_device(li, libevdev_uinput_get_devnode(uinput)); litest_assert_ptr_null(device); @@ -1123,6 +1133,7 @@ START_TEST(device_nonpointer_rel) struct libinput_device *device; int i; + /* clang-format off */ uinput = litest_create_uinput_device("test device", NULL, EV_KEY, KEY_A, @@ -1130,6 +1141,7 @@ START_TEST(device_nonpointer_rel) EV_REL, REL_X, EV_REL, REL_Y, -1); + /* clang-format on */ _litest_context_destroy_ struct libinput *li = litest_create_context(); device = libinput_path_add_device(li, libevdev_uinput_get_devnode(uinput)); @@ -1163,6 +1175,7 @@ START_TEST(device_touchpad_rel) }; int i; + /* clang-format off */ uinput = litest_create_uinput_abs_device("test device", NULL, abs, EV_KEY, BTN_TOOL_FINGER, @@ -1170,6 +1183,7 @@ START_TEST(device_touchpad_rel) EV_REL, REL_X, EV_REL, REL_Y, -1); + /* clang-format on */ _litest_context_destroy_ struct libinput *li = litest_create_context(); device = libinput_path_add_device(li, libevdev_uinput_get_devnode(uinput)); @@ -1201,12 +1215,14 @@ START_TEST(device_touch_rel) }; int i; + /* clang-format off */ uinput = litest_create_uinput_abs_device("test device", NULL, abs, EV_KEY, BTN_TOUCH, EV_REL, REL_X, EV_REL, REL_Y, -1); + /* clang-format on */ _litest_context_destroy_ struct libinput *li = litest_create_context(); device = libinput_path_add_device(li, libevdev_uinput_get_devnode(uinput)); @@ -1236,6 +1252,7 @@ START_TEST(device_abs_rel) }; int i; + /* clang-format off */ uinput = litest_create_uinput_abs_device("test device", NULL, abs, EV_KEY, BTN_TOUCH, @@ -1243,6 +1260,7 @@ START_TEST(device_abs_rel) EV_REL, REL_X, EV_REL, REL_Y, -1); + /* clang-format on */ _litest_context_destroy_ struct libinput *li = litest_create_context(); device = libinput_path_add_device(li, libevdev_uinput_get_devnode(uinput)); @@ -1518,9 +1536,11 @@ START_TEST(device_capability_nocaps_ignored) /* SW_PEN_INSERTED isn't handled in libinput so the device is * processed but ends up without seat capabilities and is ignored. */ + /* clang-format off */ uinput = litest_create_uinput_device("test device", NULL, EV_SW, SW_PEN_INSERTED, -1); + /* clang-format on */ _litest_context_destroy_ struct libinput *li = litest_create_context(); device = libinput_path_add_device(li, libevdev_uinput_get_devnode(uinput)); diff --git a/test/test-misc.c b/test/test-misc.c index ea24125b..7dca1429 100644 --- a/test/test-misc.c +++ b/test/test-misc.c @@ -96,6 +96,7 @@ START_TEST(event_conversion_device_notify) struct libinput_event *event; int device_added = 0, device_removed = 0; + /* clang-format off */ uinput = create_simple_test_device("litest test device", EV_REL, REL_X, EV_REL, REL_Y, @@ -103,6 +104,7 @@ START_TEST(event_conversion_device_notify) EV_KEY, BTN_MIDDLE, EV_KEY, BTN_LEFT, -1, -1); + /* clang-format on */ _litest_context_destroy_ struct libinput *li = litest_create_context(); litest_restore_log_handler(li); /* use the default litest handler */ libinput_path_add_device(li, libevdev_uinput_get_devnode(uinput)); @@ -604,6 +606,7 @@ START_TEST(fd_no_event_leak) const char *path; struct libinput_event *event; + /* clang-format off */ uinput = create_simple_test_device("litest test device", EV_REL, REL_X, EV_REL, REL_Y, @@ -611,6 +614,7 @@ START_TEST(fd_no_event_leak) EV_KEY, BTN_MIDDLE, EV_KEY, BTN_LEFT, -1, -1); + /* clang-format on */ path = libevdev_uinput_get_devnode(uinput); fd = open(path, O_RDWR | O_NONBLOCK | O_CLOEXEC); diff --git a/test/test-path.c b/test/test-path.c index 9005a4bf..3d269d4c 100644 --- a/test/test-path.c +++ b/test/test-path.c @@ -228,12 +228,14 @@ START_TEST(path_create_destroy) counter.open_func_count = 0; counter.close_func_count = 0; + /* clang-format off */ uinput = litest_create_uinput_device("test device", NULL, EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, EV_REL, REL_X, EV_REL, REL_Y, -1); + /* clang-format on */ li = libinput_path_create_context(&counting_interface, &counter); litest_assert_notnull(li); @@ -546,12 +548,14 @@ START_TEST(path_suspend) int rc; void *userdata = &rc; + /* clang-format off */ uinput = litest_create_uinput_device("test device", NULL, EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, EV_REL, REL_X, EV_REL, REL_Y, -1); + /* clang-format on */ li = libinput_path_create_context(&simple_interface, userdata); litest_assert_notnull(li); @@ -576,12 +580,14 @@ START_TEST(path_double_suspend) int rc; void *userdata = &rc; + /* clang-format off */ uinput = litest_create_uinput_device("test device", NULL, EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, EV_REL, REL_X, EV_REL, REL_Y, -1); + /* clang-format on */ li = libinput_path_create_context(&simple_interface, userdata); litest_assert_notnull(li); @@ -607,12 +613,14 @@ START_TEST(path_double_resume) int rc; void *userdata = &rc; + /* clang-format off */ uinput = litest_create_uinput_device("test device", NULL, EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, EV_REL, REL_X, EV_REL, REL_Y, -1); + /* clang-format on */ li = libinput_path_create_context(&simple_interface, userdata); litest_assert_notnull(li); @@ -640,6 +648,7 @@ START_TEST(path_add_device_suspend_resume) int nevents; void *userdata = &rc; + /* clang-format off */ uinput1 = litest_create_uinput_device("test device", NULL, EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -652,6 +661,7 @@ START_TEST(path_add_device_suspend_resume) EV_REL, REL_X, EV_REL, REL_Y, -1); + /* clang-format on */ li = libinput_path_create_context(&simple_interface, userdata); litest_assert_notnull(li); @@ -712,6 +722,7 @@ START_TEST(path_add_device_suspend_resume_fail) int nevents; void *userdata = &rc; + /* clang-format off */ uinput1 = litest_create_uinput_device("test device", NULL, EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -724,6 +735,7 @@ START_TEST(path_add_device_suspend_resume_fail) EV_REL, REL_X, EV_REL, REL_Y, -1); + /* clang-format on */ li = libinput_path_create_context(&simple_interface, userdata); litest_assert_notnull(li); @@ -795,6 +807,7 @@ START_TEST(path_add_device_suspend_resume_remove_device) int nevents; void *userdata = &rc; + /* clang-format off */ uinput1 = litest_create_uinput_device("test device", NULL, EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, @@ -807,6 +820,7 @@ START_TEST(path_add_device_suspend_resume_remove_device) EV_REL, REL_X, EV_REL, REL_Y, -1); + /* clang-format on */ li = libinput_path_create_context(&simple_interface, userdata); litest_assert_notnull(li); @@ -872,12 +886,14 @@ START_TEST(path_device_gone) struct libevdev_uinput *uinput; struct libinput_event *event; + /* clang-format off */ uinput = litest_create_uinput_device("test device", NULL, EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, EV_REL, REL_X, EV_REL, REL_Y, -1); + /* clang-format on */ li = libinput_path_create_context(&simple_interface, NULL); litest_assert_notnull(li); @@ -915,12 +931,14 @@ START_TEST(path_seat_recycle) int found = 0; void *user_data; + /* clang-format off */ uinput = litest_create_uinput_device("test device", NULL, EV_KEY, BTN_LEFT, EV_KEY, BTN_RIGHT, EV_REL, REL_X, EV_REL, REL_Y, -1); + /* clang-format on */ li = libinput_path_create_context(&simple_interface, userdata); litest_assert_notnull(li); diff --git a/test/test-quirks.c b/test/test-quirks.c index 1b5cd120..1639c5c7 100644 --- a/test/test-quirks.c +++ b/test/test-quirks.c @@ -967,6 +967,7 @@ START_TEST(quirks_parse_dimension_attr) QUIRK_ATTR_SIZE_HINT, QUIRK_ATTR_RESOLUTION_HINT, }; + /* clang-format off */ struct qtest_dim test_values[] = { { "10x10", true, 10, 10 }, { "20x30", true, 20, 30 }, @@ -976,6 +977,7 @@ START_TEST(quirks_parse_dimension_attr) { "0x00", false, 0, 0 }, { "0xa0", false, 0, 0 }, }; + /* clang-format on */ ARRAY_FOR_EACH(attrs, a) { ARRAY_FOR_EACH(test_values, t) { @@ -1011,6 +1013,7 @@ START_TEST(quirks_parse_range_attr) QUIRK_ATTR_TOUCH_SIZE_RANGE, QUIRK_ATTR_PRESSURE_RANGE, }; + /* clang-format off */ struct qtest_range test_values[] = { { "20:10", true, 20, 10 }, { "30:5", true, 30, 5 }, @@ -1028,6 +1031,7 @@ START_TEST(quirks_parse_range_attr) { "0xa0", false, 0, 0 }, { "0x10:0x5", false, 0, 0 }, }; + /* clang-format on */ ARRAY_FOR_EACH(attrs, a) { ARRAY_FOR_EACH(test_values, t) { @@ -1064,6 +1068,7 @@ START_TEST(quirks_parse_uint_attr) QUIRK_ATTR_PALM_PRESSURE_THRESHOLD, QUIRK_ATTR_THUMB_PRESSURE_THRESHOLD, }; + /* clang-format off */ struct qtest_uint test_values[] = { { "10", true, 10 }, { "0", true, 0 }, @@ -1075,6 +1080,7 @@ START_TEST(quirks_parse_uint_attr) { "0xab", false, 0 }, { "ab", false, 0 }, }; + /* clang-format on */ ARRAY_FOR_EACH(attrs, a) { ARRAY_FOR_EACH(test_values, t) { @@ -1108,6 +1114,7 @@ START_TEST(quirks_parse_double_attr) enum quirk attrs[] = { QUIRK_ATTR_TRACKPOINT_MULTIPLIER, }; + /* clang-format off */ struct qtest_double test_values[] = { { "10", true, 10.0 }, { "10.0", true, 10.0 }, @@ -1127,6 +1134,7 @@ START_TEST(quirks_parse_double_attr) { "10:5", false, 0 }, { "10x5", false, 0 }, }; + /* clang-format on */ ARRAY_FOR_EACH(attrs, a) { ARRAY_FOR_EACH(test_values, t) { @@ -1161,6 +1169,7 @@ START_TEST(quirks_parse_string_attr) QUIRK_ATTR_LID_SWITCH_RELIABILITY, QUIRK_ATTR_KEYBOARD_INTEGRATION, }; + /* clang-format off */ struct qtest_str test_values[] = { { "below", QUIRK_ATTR_TPKBCOMBO_LAYOUT }, { "reliable", QUIRK_ATTR_LID_SWITCH_RELIABILITY }, @@ -1178,6 +1187,7 @@ START_TEST(quirks_parse_string_attr) { "0xa", 0 }, { "0.0", 0 }, }; + /* clang-format on */ ARRAY_FOR_EACH(attrs, a) { ARRAY_FOR_EACH(test_values, t) { @@ -1211,6 +1221,7 @@ START_TEST(quirks_parse_bool_attr) QUIRK_ATTR_USE_VELOCITY_AVERAGING, QUIRK_ATTR_TABLET_SMOOTHING, }; + /* clang-format off */ struct qtest_bool test_values[] = { { "0", true, false }, { "1", true, true }, @@ -1218,6 +1229,7 @@ START_TEST(quirks_parse_bool_attr) { "-1", false, false }, { "a", false, false }, }; + /* clang-format on */ ARRAY_FOR_EACH(attrs, a) { ARRAY_FOR_EACH(test_values, t) { diff --git a/test/test-touchpad-buttons.c b/test/test-touchpad-buttons.c index c6437d92..385865dd 100644 --- a/test/test-touchpad-buttons.c +++ b/test/test-touchpad-buttons.c @@ -2207,6 +2207,7 @@ START_TEST(touchpad_non_clickpad_detection) /* Create a touchpad with only a left button but missing * INPUT_PROP_BUTTONPAD. We should treat this as clickpad. */ + /* clang-format off */ uinput = litest_create_uinput_abs_device("litest NonClickpad", NULL, absinfo, @@ -2214,6 +2215,7 @@ START_TEST(touchpad_non_clickpad_detection) EV_KEY, BTN_TOOL_FINGER, EV_KEY, BTN_TOUCH, -1); + /* clang-format on */ _litest_context_destroy_ struct libinput *li = litest_create_context(); device = libinput_path_add_device(li, diff --git a/test/test-utils.c b/test/test-utils.c index 62d73a6f..5f2952bf 100644 --- a/test/test-utils.c +++ b/test/test-utils.c @@ -144,6 +144,7 @@ START_TEST(find_files_test) litest_assert_neg_errno_success(mkdir_p(d2)); litest_assert_neg_errno_success(mkdir_p(d3)); + /* clang-format off */ struct f { const char *name; const char *dir1; @@ -163,6 +164,7 @@ START_TEST(find_files_test) { "70-rst.fix", d1, NULL, d3 }, { NULL }, }; + /* clang-format on */ for (struct f *f = files; f->name; f++) { if (f->dir1) { _autofree_ char *path = strdup_printf("%s/%s", f->dir1, f->name); @@ -639,6 +641,7 @@ struct parser_test { START_TEST(dpi_parser) { + /* clang-format off */ struct parser_test tests[] = { { "450 *1800 3200", 1800 }, { "*450 1800 3200", 450 }, @@ -664,6 +667,7 @@ START_TEST(dpi_parser) { "* ", 0 }, { NULL, 0 } }; + /* clang-format on */ int i, dpi; for (i = 0; tests[i].tag != NULL; i++) { @@ -678,6 +682,7 @@ END_TEST START_TEST(wheel_click_parser) { + /* clang-format off */ struct parser_test tests[] = { { "1", 1 }, { "10", 10 }, @@ -693,6 +698,7 @@ START_TEST(wheel_click_parser) { "361", 0 }, { NULL, 0 } }; + /* clang-format on */ int i, angle; @@ -705,6 +711,7 @@ END_TEST START_TEST(wheel_click_count_parser) { + /* clang-format off */ struct parser_test tests[] = { { "1", 1 }, { "10", 10 }, @@ -720,6 +727,7 @@ START_TEST(wheel_click_count_parser) { "361", 0 }, { NULL, 0 } }; + /* clang-format on */ int i, angle; @@ -735,6 +743,7 @@ END_TEST START_TEST(dimension_prop_parser) { + /* clang-format off */ struct parser_test_dimension { char *tag; bool success; @@ -758,6 +767,7 @@ START_TEST(dimension_prop_parser) { "x10", false, 0, 0 }, { NULL, false, 0, 0 } }; + /* clang-format on */ int i; size_t x, y; bool success; @@ -782,6 +792,7 @@ END_TEST START_TEST(reliability_prop_parser) { + /* clang-format off */ struct parser_test_reliability { char *tag; bool success; @@ -795,6 +806,7 @@ START_TEST(reliability_prop_parser) { "1", false, 0 }, { NULL, false, 0, } }; + /* clang-format on */ enum switch_reliability r; bool success; int i; @@ -822,6 +834,7 @@ START_TEST(calibration_prop_parser) { #define DEFAULT_VALUES { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 } const float untouched[6] = DEFAULT_VALUES; + /* clang-format off */ struct parser_test_calibration { char *prop; bool success; @@ -838,6 +851,7 @@ START_TEST(calibration_prop_parser) { "0xff 2 3 4 5 6", false, DEFAULT_VALUES }, { NULL, false, DEFAULT_VALUES } }; + /* clang-format on */ bool success; float calibration[6]; int rc; @@ -871,6 +885,7 @@ END_TEST START_TEST(range_prop_parser) { + /* clang-format off */ struct parser_test_range { char *tag; bool success; @@ -887,6 +902,7 @@ START_TEST(range_prop_parser) { "10:30:10", false, 0, 0 }, { NULL, false, 0, 0 } }; + /* clang-format on */ int i; int hi, lo; bool success; @@ -911,6 +927,7 @@ END_TEST START_TEST(boolean_prop_parser) { + /* clang-format off */ struct parser_test_range { char *tag; bool success; @@ -923,6 +940,7 @@ START_TEST(boolean_prop_parser) { "abcd", false, false }, { NULL, false, false } }; + /* clang-format on */ int i; bool success, b; @@ -943,6 +961,7 @@ END_TEST START_TEST(evcode_prop_parser) { + /* clang-format off */ struct parser_test_tuple { const char *prop; bool success; @@ -993,6 +1012,7 @@ START_TEST(evcode_prop_parser) { .prop = "none", .success = false }, { .prop = NULL }, }; + /* clang-format on */ struct parser_test_tuple *t; for (int i = 0; tests[i].prop; i++) { @@ -1021,6 +1041,7 @@ END_TEST START_TEST(input_prop_parser) { + /* clang-format off */ struct parser_test_val { const char *prop; bool success; @@ -1044,6 +1065,7 @@ START_TEST(input_prop_parser) { .prop = "none", .success = false }, { .prop = NULL }, }; + /* clang-format on */ struct parser_test_val *t; for (int i = 0; tests[i].prop; i++) { @@ -1068,6 +1090,7 @@ END_TEST START_TEST(evdev_abs_parser) { + /* clang-format off */ struct test { uint32_t which; const char *prop; @@ -1120,6 +1143,7 @@ START_TEST(evdev_abs_parser) { .which = 0, .prop = ":asb::::" }, { .which = 0, .prop = "foo" }, }; + /* clang-format on */ ARRAY_FOR_EACH(tests, t) { struct input_absinfo abs; @@ -1155,6 +1179,7 @@ END_TEST START_TEST(human_time) { + /* clang-format off */ struct ht_tests { uint64_t interval; unsigned int value; @@ -1174,6 +1199,7 @@ START_TEST(human_time) { 1000 * 24 * 60 * s2us(60), 1000, "d" }, { 0, 0, NULL }, }; + /* clang-format on */ for (int i = 0; tests[i].unit != NULL; i++) { struct human_time ht; @@ -1192,6 +1218,7 @@ struct atoi_test { START_TEST(safe_atoi_test) { + /* clang-format off */ struct atoi_test tests[] = { { "10", true, 10 }, { "20", true, 20 }, @@ -1210,6 +1237,7 @@ START_TEST(safe_atoi_test) { "x10", false, 0 }, { NULL, false, 0 } }; + /* clang-format on */ int v; bool success; @@ -1227,6 +1255,7 @@ END_TEST START_TEST(safe_atoi_base_16_test) { + /* clang-format off */ struct atoi_test tests[] = { { "10", true, 0x10 }, { "20", true, 0x20 }, @@ -1243,6 +1272,7 @@ START_TEST(safe_atoi_base_16_test) { "x10", false, 0 }, { NULL, false, 0 } }; + /* clang-format on */ int v; bool success; @@ -1261,6 +1291,7 @@ END_TEST START_TEST(safe_atoi_base_8_test) { + /* clang-format off */ struct atoi_test tests[] = { { "7", true, 07 }, { "10", true, 010 }, @@ -1280,6 +1311,7 @@ START_TEST(safe_atoi_base_8_test) { "x10", false, 0 }, { NULL, false, 0 } }; + /* clang-format on */ int v; bool success; @@ -1304,6 +1336,7 @@ struct atou_test { START_TEST(safe_atou_test) { + /* clang-format off */ struct atou_test tests[] = { { "10", true, 10 }, { "20", true, 20 }, @@ -1321,6 +1354,7 @@ START_TEST(safe_atou_test) { "x10", false, 0 }, { NULL, false, 0 } }; + /* clang-format on */ unsigned int v; bool success; @@ -1338,6 +1372,7 @@ END_TEST START_TEST(safe_atou_base_16_test) { + /* clang-format off */ struct atou_test tests[] = { { "10", true, 0x10 }, { "20", true, 0x20 }, @@ -1354,6 +1389,7 @@ START_TEST(safe_atou_base_16_test) { "x10", false, 0 }, { NULL, false, 0 } }; + /* clang-format on */ unsigned int v; bool success; @@ -1372,6 +1408,7 @@ END_TEST START_TEST(safe_atou_base_8_test) { + /* clang-format off */ struct atou_test tests[] = { { "7", true, 07 }, { "10", true, 010 }, @@ -1391,6 +1428,7 @@ START_TEST(safe_atou_base_8_test) { "x10", false, 0 }, { NULL, false, 0 } }; + /* clang-format on */ unsigned int v; bool success; @@ -1415,6 +1453,7 @@ struct atou64_test { START_TEST(safe_atou64_test) { + /* clang-format off */ struct atou64_test tests[] = { { "10", true, 10 }, { "20", true, 20 }, @@ -1433,6 +1472,7 @@ START_TEST(safe_atou64_test) { "x10", false, 0 }, { NULL, false, 0 } }; + /* clang-format on */ uint64_t v; bool success; @@ -1450,6 +1490,7 @@ END_TEST START_TEST(safe_atod_test) { + /* clang-format off */ struct atod_test { char *str; bool success; @@ -1480,6 +1521,7 @@ START_TEST(safe_atod_test) { "0x0x", false, 0 }, { NULL, false, 0 } }; + /* clang-format on */ double v; bool success; @@ -1497,6 +1539,7 @@ END_TEST START_TEST(strsplit_test) { + /* clang-format off */ struct strsplit_test { const char *string; const char *delim; @@ -1522,6 +1565,7 @@ START_TEST(strsplit_test) { "oneoneone", "one", { NULL} , 0 }, { NULL, NULL, { NULL }, 0} }; + /* clang-format on */ struct strsplit_test *t = tests; while (t->string) { @@ -1565,6 +1609,7 @@ static int strv_test_set_bitmask(const char *str, size_t index, void *data) START_TEST(strv_for_each_test) { + /* clang-format off */ struct test_data { const char *terminator; int index; @@ -1579,6 +1624,7 @@ START_TEST(strv_for_each_test) { NULL, 0, 0x1f }, { NULL, 0 }, }; + /* clang-format on */ const char *array[] = { "one", "two", "three", "four", "five", NULL }; struct test_data *t = test_data; @@ -1767,6 +1813,7 @@ END_TEST START_TEST(double_array_from_string_test) { + /* clang-format off */ struct double_array_from_string_test { const char *string; const char *delim; @@ -1791,6 +1838,7 @@ START_TEST(double_array_from_string_test) { "oneoneone", "one", { 0 }, 0 }, { NULL, NULL, { 0 }, 0 } }; + /* clang-format on */ struct double_array_from_string_test *t = tests; while (t->string) { @@ -1813,6 +1861,7 @@ END_TEST START_TEST(strargv_test) { + /* clang-format off */ struct argv_test { int argc; char *argv[10]; @@ -1827,6 +1876,7 @@ START_TEST(strargv_test) { 1, {NULL, NULL}, 0 }, { 3, {"hello", NULL, "World"}, 0 }, }; + /* clang-format on */ ARRAY_FOR_EACH(tests, t) { char **strv = strv_from_argv(t->argc, t->argv); @@ -1850,6 +1900,7 @@ END_TEST START_TEST(kvsplit_double_test) { + /* clang-format off */ struct kvsplit_dbl_test { const char *string; const char *psep; @@ -1874,6 +1925,7 @@ START_TEST(kvsplit_double_test) { "1.2.3.4.5", ".", "", -1, {}}, { NULL } }; + /* clang-format on */ struct kvsplit_dbl_test *t = tests; while (t->string) { @@ -1899,6 +1951,7 @@ END_TEST START_TEST(strjoin_test) { + /* clang-format off */ struct strjoin_test { char *strv[10]; const char *joiner; @@ -1917,6 +1970,7 @@ START_TEST(strjoin_test) { { "", "", "", NULL }, "", "" }, { { NULL }, NULL, NULL } }; + /* clang-format on */ struct strjoin_test *t = tests; struct strjoin_test nulltest = { {NULL}, "x", NULL }; @@ -1937,6 +1991,7 @@ END_TEST START_TEST(strstrip_test) { + /* clang-format off */ struct strstrip_test { const char *string; const char *expected; @@ -1961,6 +2016,7 @@ START_TEST(strstrip_test) { "", "", "" }, { NULL , NULL, NULL } }; + /* clang-format on */ struct strstrip_test *t = tests; while (t->string) { @@ -1975,6 +2031,7 @@ END_TEST START_TEST(strendswith_test) { + /* clang-format off */ struct strendswith_test { const char *string; const char *suffix; @@ -1989,6 +2046,7 @@ START_TEST(strendswith_test) { "", "foo", false }, { NULL, NULL, false }, }; + /* clang-format on */ for (struct strendswith_test *t = tests; t->string; t++) { litest_assert_int_eq(strendswith(t->string, t->suffix), @@ -1999,6 +2057,7 @@ END_TEST START_TEST(strstartswith_test) { + /* clang-format off */ struct strstartswith_test { const char *string; const char *suffix; @@ -2013,6 +2072,7 @@ START_TEST(strstartswith_test) { "foo", "", false }, { NULL, NULL, false }, }; + /* clang-format on */ for (struct strstartswith_test *t = tests; t->string; t++) { litest_assert_int_eq(strstartswith(t->string, t->suffix), @@ -2023,6 +2083,7 @@ END_TEST START_TEST(strsanitize_test) { + /* clang-format off */ struct strsanitize_test { const char *string; const char *expected; @@ -2037,6 +2098,7 @@ START_TEST(strsanitize_test) { "%s%s", "%%s%%s" }, { NULL, NULL }, }; + /* clang-format on */ for (struct strsanitize_test *t = tests; t->string; t++) { char *sanitized = str_sanitize(t->string); diff --git a/tools/libinput-debug-events.c b/tools/libinput-debug-events.c index a6d7a69d..fb451548 100644 --- a/tools/libinput-debug-events.c +++ b/tools/libinput-debug-events.c @@ -212,6 +212,7 @@ main(int argc, char **argv) OPT_QUIET, OPT_COMPRESS_MOTION_EVENTS, }; + /* clang-format off */ static struct option opts[] = { CONFIGURATION_OPTIONS, { "help", no_argument, 0, 'h' }, @@ -222,8 +223,9 @@ main(int argc, char **argv) { "verbose", no_argument, 0, OPT_VERBOSE }, { "quiet", no_argument, 0, OPT_QUIET }, { "compress-motion-events", no_argument, 0, OPT_COMPRESS_MOTION_EVENTS }, - { 0, 0, 0, 0} + { 0, 0, 0, 0}, }; + /* clang-format on */ c = getopt_long(argc, argv, "h", opts, &option_index); if (c == -1) diff --git a/tools/libinput-debug-gui.c b/tools/libinput-debug-gui.c index bd3681c5..3a2d0322 100644 --- a/tools/libinput-debug-gui.c +++ b/tools/libinput-debug-gui.c @@ -1942,6 +1942,7 @@ main(int argc, char **argv) OPT_GRAB, OPT_VERBOSE, }; + /* clang-format off */ static struct option opts[] = { CONFIGURATION_OPTIONS, { "help", no_argument, 0, 'h' }, @@ -1949,8 +1950,9 @@ main(int argc, char **argv) { "udev", required_argument, 0, OPT_UDEV }, { "grab", no_argument, 0, OPT_GRAB }, { "verbose", no_argument, 0, OPT_VERBOSE }, - { 0, 0, 0, 0} + { 0, 0, 0, 0}, }; + /* clang-format on */ c = getopt_long(argc, argv, "h", opts, &option_index); if (c == -1) diff --git a/tools/libinput-measure.c b/tools/libinput-measure.c index 2ed72a89..2b01258c 100644 --- a/tools/libinput-measure.c +++ b/tools/libinput-measure.c @@ -43,7 +43,7 @@ main(int argc, char **argv) int c; static struct option opts[] = { { "help", no_argument, 0, 'h' }, - { 0, 0, 0, 0} + { 0, 0, 0, 0}, }; c = getopt_long(argc, argv, "+h", opts, &option_index);