From d458b862407d193f7e00e9c2a632dba0611f5b16 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 27 Jun 2025 18:37:57 +1000 Subject: [PATCH] test: correct two capability checks We have one test device that only has a horizontal scroll wheel but not a vertical one, causing these tests to run unexpectedly. One test needs both enabled (not strictly so but let's not bother) and the other one only needs the vertical wheel. Part-of: --- test/test-pointer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/test-pointer.c b/test/test-pointer.c index 14263da9..a03b2b2a 100644 --- a/test/test-pointer.c +++ b/test/test-pointer.c @@ -849,7 +849,7 @@ START_TEST(pointer_scroll_wheel_inhibit_small_deltas) struct litest_device *dev = litest_current_device(); struct libinput *li = dev->libinput; - if (!libevdev_has_event_code(dev->evdev, EV_REL, REL_WHEEL_HI_RES) && + if (!libevdev_has_event_code(dev->evdev, EV_REL, REL_WHEEL_HI_RES) || !libevdev_has_event_code(dev->evdev, EV_REL, REL_HWHEEL_HI_RES)) return LITEST_NOT_APPLICABLE; @@ -899,8 +899,7 @@ START_TEST(pointer_scroll_wheel_inhibit_dir_change) struct litest_device *dev = litest_current_device(); struct libinput *li = dev->libinput; - if (!libevdev_has_event_code(dev->evdev, EV_REL, REL_WHEEL_HI_RES) && - !libevdev_has_event_code(dev->evdev, EV_REL, REL_HWHEEL_HI_RES)) + if (!libevdev_has_event_code(dev->evdev, EV_REL, REL_WHEEL_HI_RES)) return LITEST_NOT_APPLICABLE; litest_drain_events(dev->libinput);