[PATCH libinput 1/5] test: replace tap config with helper function
Peter Hutterer
peter.hutterer at who-t.net
Sun Jun 21 21:54:25 PDT 2015
No functional change, other than that we check for status codes now too.
In tests that don't specifically check the interface itself, a short
enable_tap() or disable_tap() is a lot more obvious to parse for the reader.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
test/litest.h | 24 ++++++++++++
test/touchpad-tap.c | 109 ++++++++++++++++++----------------------------------
test/touchpad.c | 68 ++++++++++++--------------------
3 files changed, 85 insertions(+), 116 deletions(-)
diff --git a/test/litest.h b/test/litest.h
index b08ac40..4990fdd 100644
--- a/test/litest.h
+++ b/test/litest.h
@@ -414,4 +414,28 @@ void litest_semi_mt_touch_up(struct litest_device *d,
#define ck_assert_notnull(ptr) ck_assert_ptr_ne(ptr, NULL)
#endif
+static inline void
+litest_enable_tap(struct libinput_device *device)
+{
+ enum libinput_config_status status, expected;
+
+ expected = LIBINPUT_CONFIG_STATUS_SUCCESS;
+ status = libinput_device_config_tap_set_enabled(device,
+ LIBINPUT_CONFIG_TAP_ENABLED);
+
+ litest_assert_int_eq(status, expected);
+}
+
+static inline void
+litest_disable_tap(struct libinput_device *device)
+{
+ enum libinput_config_status status, expected;
+
+ expected = LIBINPUT_CONFIG_STATUS_SUCCESS;
+ status = libinput_device_config_tap_set_enabled(device,
+ LIBINPUT_CONFIG_TAP_DISABLED);
+
+ litest_assert_int_eq(status, expected);
+}
+
#endif /* LITEST_H */
diff --git a/test/touchpad-tap.c b/test/touchpad-tap.c
index 2207930..423f89b 100644
--- a/test/touchpad-tap.c
+++ b/test/touchpad-tap.c
@@ -38,8 +38,7 @@ START_TEST(touchpad_1fg_tap)
struct libinput *li = dev->libinput;
struct libinput_event *event;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -68,8 +67,7 @@ START_TEST(touchpad_1fg_doubletap)
struct libinput_event_pointer *ptrev;
uint32_t oldtime, curtime;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -129,8 +127,7 @@ START_TEST(touchpad_1fg_multitap)
int range = _i, /* looped test */
ntaps;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -178,8 +175,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_move)
int range = _i, /* looped test */
ntaps;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -245,8 +241,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_2fg)
int range = _i,
ntaps;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -317,8 +312,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_click)
int range = _i, /* looped test */
ntaps;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -378,8 +372,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_timeout)
int range = _i, /* looped test */
ntaps;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -449,8 +442,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_tap)
int range = _i, /* looped test */
ntaps;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -522,8 +514,7 @@ START_TEST(touchpad_1fg_multitap_n_drag_tap_click)
int range = _i, /* looped test */
ntaps;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -601,8 +592,7 @@ START_TEST(touchpad_1fg_tap_n_drag)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -642,8 +632,7 @@ START_TEST(touchpad_1fg_tap_n_drag_tap)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -684,8 +673,7 @@ START_TEST(touchpad_1fg_tap_n_drag_tap_click)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -729,8 +717,7 @@ START_TEST(touchpad_1fg_tap_n_drag_timeout)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -759,8 +746,7 @@ START_TEST(touchpad_2fg_tap_n_drag)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -796,8 +782,7 @@ START_TEST(touchpad_2fg_tap_n_drag_3fg_btntool)
ABS_MT_SLOT) > 2)
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -842,8 +827,7 @@ START_TEST(touchpad_2fg_tap_n_drag_3fg)
ABS_MT_SLOT) <= 2)
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -881,8 +865,7 @@ START_TEST(touchpad_2fg_tap)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(dev->libinput);
@@ -908,8 +891,7 @@ START_TEST(touchpad_2fg_tap_inverted)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(dev->libinput);
@@ -935,8 +917,7 @@ START_TEST(touchpad_2fg_tap_quickrelease)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(dev->libinput);
@@ -967,8 +948,7 @@ START_TEST(touchpad_1fg_tap_click)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(dev->libinput);
@@ -1000,8 +980,7 @@ START_TEST(touchpad_2fg_tap_click)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(dev->libinput);
@@ -1036,8 +1015,7 @@ START_TEST(clickpad_2fg_tap_click)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(dev->libinput);
@@ -1068,8 +1046,7 @@ START_TEST(touchpad_2fg_tap_click_apple)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(dev->libinput);
@@ -1101,8 +1078,7 @@ START_TEST(touchpad_no_2fg_tap_after_move)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(dev->libinput);
/* one finger down, move past threshold,
@@ -1125,8 +1101,7 @@ START_TEST(touchpad_no_2fg_tap_after_timeout)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(dev->libinput);
/* one finger down, wait past tap timeout,
@@ -1152,8 +1127,7 @@ START_TEST(touchpad_no_first_fg_tap_after_move)
struct libinput *li = dev->libinput;
struct libinput_event *event;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(dev->libinput);
@@ -1184,8 +1158,7 @@ START_TEST(touchpad_1fg_double_tap_click)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(dev->libinput);
@@ -1220,8 +1193,7 @@ START_TEST(touchpad_1fg_tap_n_drag_click)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(dev->libinput);
@@ -1269,8 +1241,7 @@ START_TEST(touchpad_3fg_tap)
ABS_MT_SLOT) <= 2)
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
for (i = 0; i < 3; i++) {
litest_drain_events(li);
@@ -1307,8 +1278,7 @@ START_TEST(touchpad_3fg_tap_quickrelease)
ABS_MT_SLOT) <= 2)
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -1348,7 +1318,7 @@ START_TEST(touchpad_3fg_tap_btntool)
ABS_MT_SLOT) > 2)
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device, 1);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -1387,7 +1357,7 @@ START_TEST(touchpad_3fg_tap_btntool_inverted)
ABS_MT_SLOT) > 2)
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device, 1);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -1427,8 +1397,7 @@ START_TEST(touchpad_4fg_tap)
ABS_MT_SLOT) <= 3)
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
for (i = 0; i < 4; i++) {
litest_drain_events(li);
@@ -1462,8 +1431,7 @@ START_TEST(touchpad_4fg_tap_quickrelease)
ABS_MT_SLOT) <= 3)
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -1502,8 +1470,7 @@ START_TEST(touchpad_5fg_tap)
ABS_MT_SLOT) <= 4)
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
for (i = 0; i < 5; i++) {
litest_drain_events(li);
@@ -1539,8 +1506,7 @@ START_TEST(touchpad_5fg_tap_quickrelease)
ABS_MT_SLOT) <= 4)
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -1576,8 +1542,7 @@ START_TEST(clickpad_1fg_tap_click)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(dev->libinput);
diff --git a/test/touchpad.c b/test/touchpad.c
index 1179d57..443c8c1 100644
--- a/test/touchpad.c
+++ b/test/touchpad.c
@@ -39,8 +39,7 @@ START_TEST(touchpad_1fg_motion)
struct libinput_event *event;
struct libinput_event_pointer *ptrev;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_DISABLED);
+ litest_disable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -683,8 +682,7 @@ START_TEST(clickpad_softbutton_left_tap_n_drag)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -726,8 +724,7 @@ START_TEST(clickpad_softbutton_right_tap_n_drag)
struct litest_device *dev = litest_current_device();
struct libinput *li = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -1675,8 +1672,7 @@ START_TEST(touchpad_palm_detect_at_edge)
if (!touchpad_has_palm_detect_size(dev))
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_DISABLED);
+ litest_disable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -1720,8 +1716,7 @@ START_TEST(touchpad_palm_detect_at_bottom_corners)
if (!touchpad_has_palm_detect_size(dev))
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_DISABLED);
+ litest_disable_tap(dev->libinput_device);
/* Run for non-clickpads only: make sure the bottom corners trigger
palm detection too */
@@ -1747,8 +1742,7 @@ START_TEST(touchpad_palm_detect_at_top_corners)
if (!touchpad_has_palm_detect_size(dev))
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_DISABLED);
+ litest_disable_tap(dev->libinput_device);
/* Run for non-clickpads only: make sure the bottom corners trigger
palm detection too */
@@ -1774,8 +1768,7 @@ START_TEST(touchpad_palm_detect_palm_stays_palm)
if (!touchpad_has_palm_detect_size(dev))
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_DISABLED);
+ litest_disable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -1794,8 +1787,7 @@ START_TEST(touchpad_palm_detect_palm_becomes_pointer)
if (!touchpad_has_palm_detect_size(dev))
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_DISABLED);
+ litest_disable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -1819,8 +1811,7 @@ START_TEST(touchpad_palm_detect_no_palm_moving_into_edges)
if (!touchpad_has_palm_detect_size(dev))
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_DISABLED);
+ litest_disable_tap(dev->libinput_device);
/* moving non-palm into the edge does not label it as palm */
litest_drain_events(li);
@@ -1849,8 +1840,7 @@ START_TEST(touchpad_palm_detect_tap)
if (!touchpad_has_palm_detect_size(dev))
return;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
litest_drain_events(li);
@@ -2028,8 +2018,8 @@ START_TEST(touchpad_left_handed_tapping)
struct libinput *li = dev->libinput;
enum libinput_config_status status;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
+
status = libinput_device_config_left_handed_set(d, 1);
ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS);
@@ -2059,8 +2049,8 @@ START_TEST(touchpad_left_handed_tapping_2fg)
struct libinput *li = dev->libinput;
enum libinput_config_status status;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(dev->libinput_device);
+
status = libinput_device_config_left_handed_set(d, 1);
ck_assert_int_eq(status, LIBINPUT_CONFIG_STATUS_SUCCESS);
@@ -3022,8 +3012,7 @@ START_TEST(touchpad_initial_state)
dev = litest_current_device();
libinput1 = dev->libinput;
- libinput_device_config_tap_set_enabled(dev->libinput_device,
- LIBINPUT_CONFIG_TAP_DISABLED);
+ litest_disable_tap(dev->libinput_device);
litest_touch_down(dev, 0, x, y);
litest_touch_up(dev, 0);
@@ -3088,8 +3077,7 @@ START_TEST(touchpad_dwt)
return;
keyboard = litest_add_device(li, LITEST_KEYBOARD);
- libinput_device_config_tap_set_enabled(touchpad->libinput_device,
- LIBINPUT_CONFIG_TAP_DISABLED);
+ litest_disable_tap(touchpad->libinput_device);
litest_drain_events(li);
litest_keyboard_key(keyboard, KEY_A, true);
@@ -3131,8 +3119,7 @@ START_TEST(touchpad_dwt_enable_touch)
return;
keyboard = litest_add_device(li, LITEST_KEYBOARD);
- libinput_device_config_tap_set_enabled(touchpad->libinput_device,
- LIBINPUT_CONFIG_TAP_DISABLED);
+ litest_disable_tap(touchpad->libinput_device);
litest_drain_events(li);
litest_keyboard_key(keyboard, KEY_A, true);
@@ -3170,8 +3157,7 @@ START_TEST(touchpad_dwt_touch_hold)
return;
keyboard = litest_add_device(li, LITEST_KEYBOARD);
- libinput_device_config_tap_set_enabled(touchpad->libinput_device,
- LIBINPUT_CONFIG_TAP_DISABLED);
+ litest_disable_tap(touchpad->libinput_device);
litest_drain_events(li);
litest_keyboard_key(keyboard, KEY_A, true);
@@ -3208,8 +3194,7 @@ START_TEST(touchpad_dwt_key_hold)
return;
keyboard = litest_add_device(li, LITEST_KEYBOARD);
- libinput_device_config_tap_set_enabled(touchpad->libinput_device,
- LIBINPUT_CONFIG_TAP_DISABLED);
+ litest_disable_tap(touchpad->libinput_device);
litest_drain_events(li);
litest_keyboard_key(keyboard, KEY_A, true);
@@ -3237,8 +3222,7 @@ START_TEST(touchpad_dwt_type)
return;
keyboard = litest_add_device(li, LITEST_KEYBOARD);
- libinput_device_config_tap_set_enabled(touchpad->libinput_device,
- LIBINPUT_CONFIG_TAP_DISABLED);
+ litest_disable_tap(touchpad->libinput_device);
litest_drain_events(li);
for (i = 0; i < 5; i++) {
@@ -3276,8 +3260,7 @@ START_TEST(touchpad_dwt_type_short_timeout)
return;
keyboard = litest_add_device(li, LITEST_KEYBOARD);
- libinput_device_config_tap_set_enabled(touchpad->libinput_device,
- LIBINPUT_CONFIG_TAP_DISABLED);
+ litest_disable_tap(touchpad->libinput_device);
litest_drain_events(li);
for (i = 0; i < 5; i++) {
@@ -3314,8 +3297,7 @@ START_TEST(touchpad_dwt_tap)
return;
keyboard = litest_add_device(li, LITEST_KEYBOARD);
- libinput_device_config_tap_set_enabled(touchpad->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(touchpad->libinput_device);
litest_drain_events(li);
litest_keyboard_key(keyboard, KEY_A, true);
@@ -3345,8 +3327,7 @@ START_TEST(touchpad_dwt_tap_drag)
return;
keyboard = litest_add_device(li, LITEST_KEYBOARD);
- libinput_device_config_tap_set_enabled(touchpad->libinput_device,
- LIBINPUT_CONFIG_TAP_ENABLED);
+ litest_enable_tap(touchpad->libinput_device);
litest_drain_events(li);
litest_keyboard_key(keyboard, KEY_A, true);
@@ -3380,8 +3361,7 @@ START_TEST(touchpad_dwt_click)
return;
keyboard = litest_add_device(li, LITEST_KEYBOARD);
- libinput_device_config_tap_set_enabled(touchpad->libinput_device,
- LIBINPUT_CONFIG_TAP_DISABLED);
+ litest_disable_tap(touchpad->libinput_device);
litest_drain_events(li);
litest_keyboard_key(keyboard, KEY_A, true);
--
2.4.3
More information about the wayland-devel
mailing list