Commit fffae6fb authored by Peter Hutterer's avatar Peter Hutterer
Browse files

test: when testing for a touch sequence, assert it's the same slot's sequence


Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 1668cd5e
......@@ -3367,9 +3367,12 @@ void
litest_assert_touch_sequence(struct libinput *li)
{
struct libinput_event *event;
struct libinput_event_touch *tev;
int slot;
event = libinput_get_event(li);
litest_is_touch_event(event, LIBINPUT_EVENT_TOUCH_DOWN);
tev = litest_is_touch_event(event, LIBINPUT_EVENT_TOUCH_DOWN);
slot = libinput_event_touch_get_slot(tev);
libinput_event_destroy(event);
event = libinput_get_event(li);
......@@ -3378,7 +3381,8 @@ litest_assert_touch_sequence(struct libinput *li)
event = libinput_get_event(li);
do {
litest_is_touch_event(event, LIBINPUT_EVENT_TOUCH_MOTION);
tev = litest_is_touch_event(event, LIBINPUT_EVENT_TOUCH_MOTION);
litest_assert_int_eq(slot, libinput_event_touch_get_slot(tev));
libinput_event_destroy(event);
event = libinput_get_event(li);
......@@ -3389,7 +3393,8 @@ litest_assert_touch_sequence(struct libinput *li)
litest_assert_notnull(event);
} while (libinput_event_get_type(event) != LIBINPUT_EVENT_TOUCH_UP);
litest_is_touch_event(event, LIBINPUT_EVENT_TOUCH_UP);
tev = litest_is_touch_event(event, LIBINPUT_EVENT_TOUCH_UP);
litest_assert_int_eq(slot, libinput_event_touch_get_slot(tev));
libinput_event_destroy(event);
event = libinput_get_event(li);
litest_is_touch_event(event, LIBINPUT_EVENT_TOUCH_FRAME);
......
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