mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-03 18:10:28 +01:00
test: add a test to force a destroy for the path backend
The test suite (and tests) we have now all clean up nicely before calling the final libinput_unref(). Add one where there's at least one device still connected. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
b887ddc756
commit
4e7db651ce
1 changed files with 19 additions and 0 deletions
|
|
@ -192,6 +192,24 @@ START_TEST(path_create_destroy)
|
|||
}
|
||||
END_TEST
|
||||
|
||||
START_TEST(path_force_destroy)
|
||||
{
|
||||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li;
|
||||
struct libinput_device *device;
|
||||
|
||||
li = libinput_path_create_context(&simple_interface, NULL);
|
||||
ck_assert_notnull(li);
|
||||
libinput_ref(li);
|
||||
device = libinput_path_add_device(li,
|
||||
libevdev_uinput_get_devnode(dev->uinput));
|
||||
ck_assert_notnull(device);
|
||||
|
||||
while (libinput_unref(li) != NULL)
|
||||
;
|
||||
}
|
||||
END_TEST
|
||||
|
||||
START_TEST(path_set_user_data)
|
||||
{
|
||||
struct libinput *li;
|
||||
|
|
@ -936,6 +954,7 @@ litest_setup_tests_path(void)
|
|||
litest_add_no_device("path:create", path_create_invalid_file);
|
||||
litest_add_no_device("path:create", path_create_invalid_kerneldev);
|
||||
litest_add_no_device("path:create", path_create_destroy);
|
||||
litest_add("path:create", path_force_destroy, LITEST_ANY, LITEST_ANY);
|
||||
litest_add_no_device("path:create", path_set_user_data);
|
||||
litest_add_no_device("path:suspend", path_suspend);
|
||||
litest_add_no_device("path:suspend", path_double_suspend);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue