summaryrefslogtreecommitdiff
path: root/test/test-switch.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2017-04-24 08:22:08 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2017-09-05 10:48:19 +1000
commitf9a4676044ada6ca558d6fb0b538b39f7a0eb6b5 (patch)
tree04fc1749b00f5d82e8ea0b6468a33fcb99a64511 /test/test-switch.c
parente0558033214eff2c6e6cbc58c63031c25d2fe7eb (diff)
test: add test for switch capability
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test/test-switch.c')
-rw-r--r--test/test-switch.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test-switch.c b/test/test-switch.c
index 108b3a85..bdd1899f 100644
--- a/test/test-switch.c
+++ b/test/test-switch.c
@@ -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);