[PATCH libinput 7/7] test: use litest_is_button_event() helper
Peter Hutterer
peter.hutterer at who-t.net
Mon May 4 22:43:09 PDT 2015
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
test/touchpad.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/test/touchpad.c b/test/touchpad.c
index 576b2bd..15230e7 100644
--- a/test/touchpad.c
+++ b/test/touchpad.c
@@ -3842,20 +3842,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);
}
--
2.3.5
More information about the wayland-devel
mailing list