mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-02-04 22:20:32 +01:00
test: check that the width/height are set for physical devices
This commit is contained in:
parent
a9edea65ca
commit
6caf69a73c
1 changed files with 5 additions and 0 deletions
|
|
@ -123,6 +123,7 @@ MUNIT_TEST(test_passive_ei_device_type)
|
|||
_unref_(eis_device) *virt = eis_seat_new_device(seat);
|
||||
eis_device_configure_type(virt, EIS_DEVICE_TYPE_VIRTUAL);
|
||||
eis_device_configure_capability(virt, EIS_DEVICE_CAP_POINTER);
|
||||
eis_device_configure_size(virt, 200, 200); /* Has no effect on a virtual device */
|
||||
munit_assert_int(eis_device_get_type(virt), ==, EIS_DEVICE_TYPE_VIRTUAL);
|
||||
eis_device_add(virt);
|
||||
|
||||
|
|
@ -136,10 +137,14 @@ MUNIT_TEST(test_passive_ei_device_type)
|
|||
_unref_(ei_event) *event_phys = peck_ei_next_event(ei, EI_EVENT_DEVICE_ADDED);
|
||||
struct ei_device *phys = ei_event_get_device(event_phys);
|
||||
munit_assert_int(ei_device_get_type(phys), ==, EI_DEVICE_TYPE_PHYSICAL);
|
||||
munit_assert_int(ei_device_get_width(phys), ==, 100);
|
||||
munit_assert_int(ei_device_get_height(phys), ==, 100);
|
||||
|
||||
_unref_(ei_event) *event_virt = peck_ei_next_event(ei, EI_EVENT_DEVICE_ADDED);
|
||||
struct ei_device *virt = ei_event_get_device(event_virt);
|
||||
munit_assert_int(ei_device_get_type(virt), ==, EI_DEVICE_TYPE_VIRTUAL);
|
||||
munit_assert_int(ei_device_get_width(virt), ==, 0);
|
||||
munit_assert_int(ei_device_get_height(virt), ==, 0);
|
||||
}
|
||||
|
||||
return MUNIT_OK;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue