Commit f9a46760 authored by Peter Hutterer's avatar Peter Hutterer

test: add test for switch capability

Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent e0558033
......@@ -29,6 +29,16 @@
#include "libinput-util.h"
#include "litest.h"
START_TEST(switch_has_cap)
{
struct litest_device *dev = litest_current_device();
ck_assert(libinput_device_has_capability(dev->libinput_device,
LIBINPUT_DEVICE_CAP_SWITCH));
}
END_TEST
START_TEST(lid_switch)
{
struct litest_device *dev = litest_current_device();
......@@ -618,6 +628,7 @@ END_TEST
void
litest_setup_tests_lid(void)
{
litest_add("switch:has", switch_has_cap, LITEST_SWITCH, LITEST_ANY);
litest_add("lid:switch", lid_switch, LITEST_SWITCH, LITEST_ANY);
litest_add("lid:switch", lid_switch_double, LITEST_SWITCH, LITEST_ANY);
litest_add("lid:switch", lid_switch_down_on_init, LITEST_SWITCH, LITEST_ANY);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment