mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-05-08 09:18:03 +02:00
test: add the new caps to the bind-all-caps test
And bind them all at once, might as well
This commit is contained in:
parent
a890ce96bb
commit
4adf483195
1 changed files with 12 additions and 19 deletions
|
|
@ -91,30 +91,23 @@ MUNIT_TEST(eistest_cliend_bind_all_caps)
|
|||
_unref_(ei_event) *seat_added =
|
||||
peck_ei_next_event(ei, EI_EVENT_SEAT_ADDED);
|
||||
struct ei_seat *seat = ei_event_get_seat(seat_added);
|
||||
ei_seat_bind_capability(seat, EI_DEVICE_CAP_POINTER);
|
||||
ei_seat_bind_capability(seat, EI_DEVICE_CAP_POINTER_ABSOLUTE);
|
||||
ei_seat_bind_capability(seat, EI_DEVICE_CAP_KEYBOARD);
|
||||
ei_seat_bind_capability(seat, EI_DEVICE_CAP_TOUCH);
|
||||
ei_seat_bind_capabilities(seat, EI_DEVICE_CAP_POINTER,
|
||||
EI_DEVICE_CAP_POINTER_ABSOLUTE,
|
||||
EI_DEVICE_CAP_KEYBOARD,
|
||||
EI_DEVICE_CAP_TOUCH,
|
||||
EI_DEVICE_CAP_BUTTON,
|
||||
EI_DEVICE_CAP_SCROLL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
peck_dispatch_until_stable(peck);
|
||||
|
||||
with_server(peck) {
|
||||
_unref_(eis_event) *bind_ptr =
|
||||
peck_eis_next_event(eis, EIS_EVENT_SEAT_BIND);
|
||||
munit_assert_true(eis_event_seat_has_capability(bind_ptr, EIS_DEVICE_CAP_POINTER));
|
||||
|
||||
_unref_(eis_event) *bind_abs =
|
||||
peck_eis_next_event(eis, EIS_EVENT_SEAT_BIND);
|
||||
munit_assert_true(eis_event_seat_has_capability(bind_abs, EIS_DEVICE_CAP_POINTER_ABSOLUTE));
|
||||
|
||||
_unref_(eis_event) *bind_kbd =
|
||||
peck_eis_next_event(eis, EIS_EVENT_SEAT_BIND);
|
||||
munit_assert_true(eis_event_seat_has_capability(bind_kbd, EIS_DEVICE_CAP_KEYBOARD));
|
||||
|
||||
_unref_(eis_event) *bind_touch =
|
||||
peck_eis_next_event(eis, EIS_EVENT_SEAT_BIND);
|
||||
munit_assert_true(eis_event_seat_has_capability(bind_touch, EIS_DEVICE_CAP_TOUCH));
|
||||
_unref_(eis_event) *bind = peck_eis_next_event(eis, EIS_EVENT_SEAT_BIND);
|
||||
munit_assert_true(eis_event_seat_has_capability(bind, EIS_DEVICE_CAP_POINTER));
|
||||
munit_assert_true(eis_event_seat_has_capability(bind, EIS_DEVICE_CAP_POINTER_ABSOLUTE));
|
||||
munit_assert_true(eis_event_seat_has_capability(bind, EIS_DEVICE_CAP_KEYBOARD));
|
||||
munit_assert_true(eis_event_seat_has_capability(bind, EIS_DEVICE_CAP_TOUCH));
|
||||
}
|
||||
|
||||
return MUNIT_OK;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue