mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-05 21:38:09 +02:00
test: use litest_is_button_event() helper
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
fd301dfba2
commit
4a56ce17f0
1 changed files with 1 additions and 9 deletions
|
|
@ -4015,20 +4015,12 @@ assert_btnevent_from_device(struct litest_device *device,
|
|||
{
|
||||
struct libinput *li = device->libinput;
|
||||
struct libinput_event *e;
|
||||
struct libinput_event_pointer *pev;
|
||||
|
||||
libinput_dispatch(li);
|
||||
e = libinput_get_event(li);
|
||||
ck_assert_notnull(e);
|
||||
ck_assert_int_eq(libinput_event_get_type(e),
|
||||
LIBINPUT_EVENT_POINTER_BUTTON);
|
||||
pev = libinput_event_get_pointer_event(e);
|
||||
litest_is_button_event(e, button, state);
|
||||
|
||||
ck_assert_ptr_eq(libinput_event_get_device(e), device->libinput_device);
|
||||
ck_assert_int_eq(libinput_event_pointer_get_button(pev),
|
||||
button);
|
||||
ck_assert_int_eq(libinput_event_pointer_get_button_state(pev),
|
||||
state);
|
||||
libinput_event_destroy(e);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue