mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 01:10:08 +01:00
test: disable clang-format in test collections
It's too much effort fighting clang-format for these snippets which all don't really do much anyway but are important to be read easily. Let's categorically disable all formatting in the test collections and move on. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
This commit is contained in:
parent
aebf3cd491
commit
ed29a4f200
19 changed files with 48 additions and 1 deletions
|
|
@ -1680,6 +1680,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(device)
|
||||
{
|
||||
/* clang-format off */
|
||||
struct range abs_range = range_init_exclusive(0, ABS_MISC);
|
||||
struct range abs_mt_range = range_init_exclusive(ABS_MT_SLOT + 1, ABS_CNT);
|
||||
|
||||
|
|
@ -1764,4 +1765,5 @@ TEST_COLLECTION(device)
|
|||
litest_add(device_seat_phys_name, LITEST_ANY, LITEST_ANY);
|
||||
|
||||
litest_add(device_button_down_remove, LITEST_BUTTON, LITEST_ANY);
|
||||
/* clang-format off */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2226,6 +2226,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(gestures)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add(gestures_cap, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
|
||||
litest_add(gestures_nocap, LITEST_ANY, LITEST_TOUCHPAD);
|
||||
|
||||
|
|
@ -2308,4 +2309,5 @@ TEST_COLLECTION(gestures)
|
|||
/* Timing-sensitive test, valgrind is too slow */
|
||||
if (!RUNNING_ON_VALGRIND)
|
||||
litest_add(gestures_swipe_3fg_unaccel, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -477,6 +477,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(keyboard)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add_no_device(keyboard_seat_key_count);
|
||||
litest_add_no_device(keyboard_ignore_no_pressed_release);
|
||||
litest_add_no_device(keyboard_key_auto_release);
|
||||
|
|
@ -490,4 +491,5 @@ TEST_COLLECTION(keyboard)
|
|||
litest_add(keyboard_leds, LITEST_ANY, LITEST_ANY);
|
||||
|
||||
litest_add(keyboard_no_scroll, LITEST_KEYS, LITEST_WHEEL);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -183,6 +183,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(log)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add_deviceless(log_default_priority);
|
||||
litest_add_deviceless(log_handler_invoked);
|
||||
litest_add_deviceless(log_handler_NULL);
|
||||
|
|
@ -193,4 +194,5 @@ TEST_COLLECTION(log)
|
|||
litest_add_parametrized(log_axisrange_warning, LITEST_TOUCH, LITEST_PROTOCOL_A, params);
|
||||
litest_add_parametrized(log_axisrange_warning, LITEST_TOUCHPAD, LITEST_ANY, params);
|
||||
}
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -868,6 +868,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(misc)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add_no_device(event_conversion_device_notify);
|
||||
litest_add_for_device(event_conversion_pointer, LITEST_MOUSE);
|
||||
litest_add_for_device(event_conversion_pointer_abs, LITEST_XEN_VIRTUAL_POINTER);
|
||||
|
|
@ -888,4 +889,5 @@ TEST_COLLECTION(misc)
|
|||
litest_add_no_device(fd_no_event_leak);
|
||||
|
||||
litest_add_for_device(udev_absinfo_override, LITEST_ABSINFO_OVERRIDE);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1181,6 +1181,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(pad)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add(pad_cap, LITEST_TABLET_PAD, LITEST_ANY);
|
||||
litest_add(pad_no_cap, LITEST_ANY, LITEST_TABLET_PAD);
|
||||
|
||||
|
|
@ -1223,4 +1224,5 @@ TEST_COLLECTION(pad)
|
|||
litest_add(pad_keys, LITEST_TABLET_PAD, LITEST_ANY);
|
||||
|
||||
litest_add(pad_send_events_disabled, LITEST_TABLET_PAD, LITEST_ANY);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1024,6 +1024,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(path)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add_no_device(path_create_NULL);
|
||||
litest_add_no_device(path_create_invalid);
|
||||
litest_add_no_device(path_create_invalid_file);
|
||||
|
|
@ -1051,4 +1052,5 @@ TEST_COLLECTION(path)
|
|||
litest_add_for_device(path_udev_assign_seat, LITEST_SYNAPTICS_CLICKPAD_X220);
|
||||
|
||||
litest_add_no_device(path_ignore_device);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3695,6 +3695,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(pointer)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add(pointer_motion_relative, LITEST_RELATIVE, LITEST_POINTINGSTICK);
|
||||
litest_add_for_device(pointer_motion_relative_zero, LITEST_MOUSE);
|
||||
litest_with_parameters(params,
|
||||
|
|
@ -3824,4 +3825,5 @@ TEST_COLLECTION(pointer)
|
|||
litest_add(debounce_spurious_switch_to_otherbutton, LITEST_BUTTON, LITEST_TOUCHPAD|LITEST_NO_DEBOUNCE);
|
||||
litest_add_no_device(debounce_remove_device_button_down);
|
||||
litest_add_no_device(debounce_remove_device_button_up);
|
||||
/* clang-format off */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1491,6 +1491,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(quirks)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add_deviceless(quirks_invalid_dir);
|
||||
litest_add_deviceless(quirks_empty_dir);
|
||||
|
||||
|
|
@ -1553,4 +1554,5 @@ TEST_COLLECTION(quirks)
|
|||
|
||||
litest_add_deviceless(quirks_call_NULL);
|
||||
litest_add_deviceless(quirks_ctx_ref);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1363,6 +1363,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(switch)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add(switch_has_cap, LITEST_SWITCH, LITEST_ANY);
|
||||
litest_add(switch_has_lid_switch, LITEST_SWITCH, LITEST_ANY);
|
||||
litest_add(switch_has_tablet_mode_switch, LITEST_SWITCH, LITEST_ANY);
|
||||
|
|
@ -1403,4 +1404,5 @@ TEST_COLLECTION(switch)
|
|||
litest_add(tablet_mode_disable_trackpoint_on_init, LITEST_SWITCH, LITEST_ANY);
|
||||
|
||||
litest_add(dock_toggle, LITEST_SWITCH, LITEST_ANY);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7465,6 +7465,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(tablet)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add(tool_ref, LITEST_TABLET | LITEST_TOOL_SERIAL, LITEST_ANY);
|
||||
litest_add(tool_user_data, LITEST_TABLET | LITEST_TOOL_SERIAL, LITEST_ANY);
|
||||
litest_add(tool_capability, LITEST_TABLET, LITEST_ANY);
|
||||
|
|
@ -7625,10 +7626,12 @@ TEST_COLLECTION(tablet)
|
|||
"with-motion-events", 'b') {
|
||||
litest_add_parametrized(tablet_eraser_button_disabled, LITEST_TABLET, LITEST_TOTEM|LITEST_FORCED_PROXOUT, params);
|
||||
}
|
||||
/* clang-format on */
|
||||
}
|
||||
|
||||
TEST_COLLECTION(tablet_left_handed)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add_for_device(left_handed, LITEST_WACOM_INTUOS5_PEN);
|
||||
litest_add_for_device(left_handed_tilt, LITEST_WACOM_INTUOS5_PEN);
|
||||
litest_add_for_device(left_handed_mouse_rotation, LITEST_WACOM_INTUOS5_PEN);
|
||||
|
|
@ -7647,4 +7650,5 @@ TEST_COLLECTION(tablet_left_handed)
|
|||
litest_add_parametrized(tablet_rotation_left_handed_add_touchpad, LITEST_TABLET, LITEST_ANY, params);
|
||||
litest_add_parametrized(tablet_rotation_left_handed_add_tablet, LITEST_TOUCHPAD, LITEST_ANY, params);
|
||||
}
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -570,6 +570,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(totem)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add(totem_type, LITEST_TOTEM, LITEST_ANY);
|
||||
litest_add(totem_axes, LITEST_TOTEM, LITEST_ANY);
|
||||
litest_add(totem_proximity_in_out, LITEST_TOTEM, LITEST_ANY);
|
||||
|
|
@ -586,4 +587,5 @@ TEST_COLLECTION(totem)
|
|||
litest_add(totem_arbitration_below, LITEST_TOTEM, LITEST_ANY);
|
||||
litest_add(totem_arbitration_during, LITEST_TOTEM, LITEST_ANY);
|
||||
litest_add(totem_arbitration_outside_rect, LITEST_TOTEM, LITEST_ANY);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1330,6 +1330,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(touch)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add(touch_frame_events, LITEST_TOUCH, LITEST_ANY);
|
||||
litest_add(touch_downup_no_motion, LITEST_TOUCH, LITEST_ANY);
|
||||
litest_add(touch_downup_no_motion, LITEST_SINGLE_TOUCH, LITEST_TOUCHPAD);
|
||||
|
|
@ -1381,4 +1382,5 @@ TEST_COLLECTION(touch)
|
|||
litest_add(touch_palm_detect_tool_palm_2fg, LITEST_TOUCH, LITEST_SINGLE_TOUCH);
|
||||
litest_add(touch_palm_detect_tool_palm_on_off_2fg, LITEST_TOUCH, LITEST_SINGLE_TOUCH);
|
||||
litest_add(touch_palm_detect_tool_palm_keep_type_2fg, LITEST_TOUCH, LITEST_ANY);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2232,6 +2232,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(touchpad_buttons)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add(touchpad_button, LITEST_TOUCHPAD, LITEST_CLICKPAD);
|
||||
|
||||
litest_add(touchpad_1fg_clickfinger, LITEST_CLICKPAD, LITEST_ANY);
|
||||
|
|
@ -2310,4 +2311,5 @@ TEST_COLLECTION(touchpad_buttons)
|
|||
litest_add(clickpad_middleemulation_click_disable_while_down, LITEST_CLICKPAD, LITEST_ANY);
|
||||
|
||||
litest_add_no_device(touchpad_non_clickpad_detection);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5619,6 +5619,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(touchpad_tap)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add(touchpad_1fg_tap, LITEST_TOUCHPAD, LITEST_ANY);
|
||||
litest_with_parameters(params, "fingers_1st", 'i', 3, 1, 2, 3,
|
||||
"fingers_2nd", 'i', 3, 1, 2, 3) {
|
||||
|
|
@ -5688,10 +5689,12 @@ TEST_COLLECTION(touchpad_tap)
|
|||
|
||||
litest_add(clickpad_1fg_tap_click, LITEST_CLICKPAD, LITEST_ANY);
|
||||
litest_add(clickpad_2fg_tap_click, LITEST_CLICKPAD, LITEST_SINGLE_TOUCH|LITEST_APPLE_CLICKPAD);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
||||
TEST_COLLECTION(touchpad_tap_drag)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add(touchpad_drag_lock_default_disabled, LITEST_TOUCHPAD, LITEST_ANY);
|
||||
litest_add(touchpad_drag_lock_default_unavailable, LITEST_ANY, LITEST_TOUCHPAD);
|
||||
|
||||
|
|
@ -5743,10 +5746,12 @@ TEST_COLLECTION(touchpad_tap_drag)
|
|||
litest_add(touchpad_drag_config_invalid, LITEST_TOUCHPAD, LITEST_ANY);
|
||||
litest_add(touchpad_drag_config_unsupported, LITEST_ANY, LITEST_TOUCHPAD);
|
||||
litest_add(touchpad_drag_config_enabledisable, LITEST_TOUCHPAD, LITEST_ANY);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
||||
TEST_COLLECTION(touchpad_tap_palm)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add(touchpad_tap_palm_on_idle, LITEST_TOUCHPAD, LITEST_ANY);
|
||||
litest_add(touchpad_tap_palm_on_touch, LITEST_TOUCHPAD, LITEST_ANY);
|
||||
litest_add(touchpad_tap_palm_on_touch_hold_timeout, LITEST_TOUCHPAD, LITEST_ANY);
|
||||
|
|
@ -5796,4 +5801,5 @@ TEST_COLLECTION(touchpad_tap_palm)
|
|||
litest_add(touchpad_tap_palm_click_then_tap, LITEST_CLICKPAD, LITEST_ANY);
|
||||
litest_add(touchpad_tap_palm_dwt_tap, LITEST_TOUCHPAD, LITEST_ANY);
|
||||
litest_add(touchpad_tap_palm_3fg_start, LITEST_TOUCHPAD, LITEST_ANY);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7181,6 +7181,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(touchpad)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add(touchpad_1fg_motion, LITEST_TOUCHPAD, LITEST_ANY);
|
||||
litest_add(touchpad_2fg_no_motion, LITEST_TOUCHPAD, LITEST_SINGLE_TOUCH);
|
||||
|
||||
|
|
@ -7310,10 +7311,12 @@ TEST_COLLECTION(touchpad)
|
|||
litest_add_for_device(touchpad_end_start_touch, LITEST_WACOM_INTUOS5_FINGER);
|
||||
|
||||
litest_add(touchpad_fuzz, LITEST_TOUCHPAD, LITEST_ANY);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
||||
TEST_COLLECTION(touchpad_dwt)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add(touchpad_dwt, LITEST_TOUCHPAD, LITEST_ANY);
|
||||
litest_add_for_device(touchpad_dwt_ext_and_int_keyboard, LITEST_SYNAPTICS_I2C);
|
||||
litest_add(touchpad_dwt_enable_touch, LITEST_TOUCHPAD, LITEST_ANY);
|
||||
|
|
@ -7357,10 +7360,12 @@ TEST_COLLECTION(touchpad_dwt)
|
|||
litest_add_parametrized_for_device(touchpad_dwt_multiple_keyboards_remove, LITEST_SYNAPTICS_I2C, params);
|
||||
}
|
||||
litest_add_for_device(touchpad_dwt_remove_before_keyboard, LITEST_KEYBOARD);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
||||
TEST_COLLECTION(touchpad_palm)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add(touchpad_palm_detect_at_edge, LITEST_TOUCHPAD, LITEST_ANY);
|
||||
litest_add(touchpad_palm_detect_at_top, LITEST_TOUCHPAD, LITEST_TOPBUTTONPAD);
|
||||
litest_add(touchpad_palm_detect_at_bottom_corners, LITEST_TOUCHPAD, LITEST_CLICKPAD);
|
||||
|
|
@ -7404,5 +7409,5 @@ TEST_COLLECTION(touchpad_palm)
|
|||
litest_add(touchpad_palm_clickfinger_pressure_2fg, LITEST_CLICKPAD, LITEST_ANY);
|
||||
litest_add(touchpad_palm_clickfinger_size, LITEST_CLICKPAD, LITEST_ANY);
|
||||
litest_add(touchpad_palm_clickfinger_size_2fg, LITEST_CLICKPAD, LITEST_ANY);
|
||||
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -256,6 +256,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(trackball)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add(trackball_rotation_config_defaults, LITEST_TRACKBALL, LITEST_ANY);
|
||||
litest_add(trackball_rotation_config_invalid_range, LITEST_TRACKBALL, LITEST_ANY);
|
||||
litest_add(trackball_rotation_config_no_rotation, LITEST_POINTINGSTICK, LITEST_ANY);
|
||||
|
|
@ -264,4 +265,5 @@ TEST_COLLECTION(trackball)
|
|||
litest_add(trackball_rotation_x, LITEST_TRACKBALL, LITEST_ANY);
|
||||
litest_add(trackball_rotation_y, LITEST_TRACKBALL, LITEST_ANY);
|
||||
litest_add(trackball_rotation_accel, LITEST_TRACKBALL, LITEST_ANY);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -477,6 +477,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(trackpoint)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add(trackpoint_middlebutton, LITEST_POINTINGSTICK, LITEST_ANY);
|
||||
litest_add(trackpoint_middlebutton_noscroll, LITEST_POINTINGSTICK, LITEST_ANY);
|
||||
litest_add(trackpoint_scroll, LITEST_POINTINGSTICK, LITEST_ANY);
|
||||
|
|
@ -490,4 +491,5 @@ TEST_COLLECTION(trackpoint)
|
|||
litest_add(trackpoint_palmdetect_resume_touch, LITEST_POINTINGSTICK, LITEST_ANY);
|
||||
litest_add(trackpoint_palmdetect_require_min_events, LITEST_POINTINGSTICK, LITEST_ANY);
|
||||
litest_add(trackpoint_palmdetect_require_min_events_timeout, LITEST_POINTINGSTICK, LITEST_ANY);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -584,6 +584,7 @@ END_TEST
|
|||
|
||||
TEST_COLLECTION(udev)
|
||||
{
|
||||
/* clang-format off */
|
||||
litest_add_no_device(udev_create_NULL);
|
||||
litest_add_no_device(udev_create_seat0);
|
||||
litest_add_no_device(udev_create_empty_seat);
|
||||
|
|
@ -605,4 +606,5 @@ TEST_COLLECTION(udev)
|
|||
litest_add_for_device(udev_path_remove_device, LITEST_SYNAPTICS_CLICKPAD_X220);
|
||||
|
||||
litest_add_no_device(udev_ignore_device);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue