Commit a04ba9a2 authored by Peter Hutterer's avatar Peter Hutterer

test: check if left-handed is available for the left-handed tests

Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 1dccc4fd
......@@ -1335,6 +1335,9 @@ START_TEST(touchpad_left_handed_clickpad)
struct libinput *li = dev->libinput;
enum libinput_config_status status;
if (!libinput_device_config_left_handed_is_available(d))
return;
status = libinput_device_config_left_handed_set(d, 1);
ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS);
......@@ -1386,6 +1389,9 @@ START_TEST(touchpad_left_handed_clickfinger)
struct libinput *li = dev->libinput;
enum libinput_config_status status;
if (!libinput_device_config_left_handed_is_available(d))
return;
status = libinput_device_config_left_handed_set(d, 1);
ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS);
......@@ -1427,6 +1433,9 @@ START_TEST(touchpad_left_handed_tapping)
struct libinput *li = dev->libinput;
enum libinput_config_status status;
if (!libinput_device_config_left_handed_is_available(d))
return;
litest_enable_tap(dev->libinput_device);
status = libinput_device_config_left_handed_set(d, 1);
......@@ -1458,6 +1467,9 @@ START_TEST(touchpad_left_handed_tapping_2fg)
struct libinput *li = dev->libinput;
enum libinput_config_status status;
if (!libinput_device_config_left_handed_is_available(d))
return;
litest_enable_tap(dev->libinput_device);
status = libinput_device_config_left_handed_set(d, 1);
......@@ -1491,6 +1503,9 @@ START_TEST(touchpad_left_handed_delayed)
struct libinput *li = dev->libinput;
enum libinput_config_status status;
if (!libinput_device_config_left_handed_is_available(d))
return;
litest_drain_events(li);
litest_button_click(dev, BTN_LEFT, 1);
libinput_dispatch(li);
......@@ -1543,6 +1558,9 @@ START_TEST(touchpad_left_handed_clickpad_delayed)
struct libinput *li = dev->libinput;
enum libinput_config_status status;
if (!libinput_device_config_left_handed_is_available(d))
return;
litest_drain_events(li);
litest_touch_down(dev, 0, 10, 90);
litest_button_click(dev, BTN_LEFT, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment