mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-31 21:40:09 +01:00
test: move device ID test to test/device.c
More appropriate here, they were in misc because this file didn't exist yet when they were added. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
5f65526618
commit
d7106544ea
2 changed files with 20 additions and 20 deletions
|
|
@ -599,6 +599,25 @@ START_TEST(device_disable_topsoftbutton)
|
|||
}
|
||||
END_TEST
|
||||
|
||||
START_TEST(device_ids)
|
||||
{
|
||||
struct litest_device *dev = litest_current_device();
|
||||
const char *name;
|
||||
unsigned int pid, vid;
|
||||
|
||||
name = libevdev_get_name(dev->evdev);
|
||||
pid = libevdev_get_id_product(dev->evdev);
|
||||
vid = libevdev_get_id_vendor(dev->evdev);
|
||||
|
||||
ck_assert_str_eq(name,
|
||||
libinput_device_get_name(dev->libinput_device));
|
||||
ck_assert_int_eq(pid,
|
||||
libinput_device_get_id_product(dev->libinput_device));
|
||||
ck_assert_int_eq(vid,
|
||||
libinput_device_get_id_vendor(dev->libinput_device));
|
||||
}
|
||||
END_TEST
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
litest_add("device:sendevents", device_sendevents_config, LITEST_ANY, LITEST_TOUCHPAD);
|
||||
|
|
@ -619,6 +638,7 @@ int main (int argc, char **argv)
|
|||
litest_add("device:sendevents", device_disable_release_tap_n_drag, LITEST_TOUCHPAD, LITEST_ANY);
|
||||
litest_add("device:sendevents", device_disable_release_softbutton, LITEST_CLICKPAD, LITEST_APPLE_CLICKPAD);
|
||||
litest_add("device:sendevents", device_disable_topsoftbutton, LITEST_TOPBUTTONPAD, LITEST_ANY);
|
||||
litest_add("device:id", device_ids, LITEST_ANY, LITEST_ANY);
|
||||
|
||||
return litest_run(argc, argv);
|
||||
}
|
||||
|
|
|
|||
20
test/misc.c
20
test/misc.c
|
|
@ -391,25 +391,6 @@ START_TEST(context_ref_counting)
|
|||
}
|
||||
END_TEST
|
||||
|
||||
START_TEST(device_ids)
|
||||
{
|
||||
struct litest_device *dev = litest_current_device();
|
||||
const char *name;
|
||||
unsigned int pid, vid;
|
||||
|
||||
name = libevdev_get_name(dev->evdev);
|
||||
pid = libevdev_get_id_product(dev->evdev);
|
||||
vid = libevdev_get_id_vendor(dev->evdev);
|
||||
|
||||
ck_assert_str_eq(name,
|
||||
libinput_device_get_name(dev->libinput_device));
|
||||
ck_assert_int_eq(pid,
|
||||
libinput_device_get_id_product(dev->libinput_device));
|
||||
ck_assert_int_eq(vid,
|
||||
libinput_device_get_id_vendor(dev->libinput_device));
|
||||
}
|
||||
END_TEST
|
||||
|
||||
START_TEST(config_status_string)
|
||||
{
|
||||
const char *strs[3];
|
||||
|
|
@ -555,7 +536,6 @@ int main (int argc, char **argv) {
|
|||
litest_add_no_device("events:conversion", event_conversion_key);
|
||||
litest_add_no_device("events:conversion", event_conversion_touch);
|
||||
litest_add_no_device("context:refcount", context_ref_counting);
|
||||
litest_add("device:id", device_ids, LITEST_ANY, LITEST_ANY);
|
||||
litest_add_no_device("config:status string", config_status_string);
|
||||
|
||||
litest_add_no_device("misc:matrix", matrix_helpers);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue