diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2017-04-21 16:57:39 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2017-09-06 09:24:29 +1000 |
commit | d9a729e1a77335d72296f7e44dc906b70e801ac8 (patch) | |
tree | 3df5d62488c6b86f94559a7a6570a39ccbf34076 /test/test-switch.c | |
parent | e242ad219ae89a709995e81719032fa8e9e06889 (diff) |
Add libinput_device_switch_has_switch()
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test/test-switch.c')
-rw-r--r-- | test/test-switch.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test-switch.c b/test/test-switch.c index b7d69bc7..45efeb02 100644 --- a/test/test-switch.c +++ b/test/test-switch.c @@ -39,6 +39,16 @@ START_TEST(switch_has_cap) } END_TEST +START_TEST(switch_has) +{ + struct litest_device *dev = litest_current_device(); + + ck_assert_int_eq(libinput_device_switch_has_switch(dev->libinput_device, + LIBINPUT_SWITCH_LID), + 1); +} +END_TEST + START_TEST(switch_toggle) { struct litest_device *dev = litest_current_device(); @@ -605,6 +615,7 @@ void litest_setup_tests_lid(void) { litest_add("switch:has", switch_has_cap, LITEST_SWITCH, LITEST_ANY); + litest_add("switch:has", switch_has, LITEST_SWITCH, LITEST_ANY); litest_add("switch:toggle", switch_toggle, LITEST_SWITCH, LITEST_ANY); litest_add("switch:toggle", switch_toggle_double, LITEST_SWITCH, LITEST_ANY); litest_add("switch:toggle", switch_down_on_init, LITEST_SWITCH, LITEST_ANY); |