From d9f09cec763957d68439bcc6616c2f13865cc6b7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 13 Jan 2017 16:44:15 +1000 Subject: [PATCH] test: add a tablet tool capability check Signed-off-by: Peter Hutterer --- test/test-tablet.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/test-tablet.c b/test/test-tablet.c index b4e9944f..15d7672c 100644 --- a/test/test-tablet.c +++ b/test/test-tablet.c @@ -2076,6 +2076,16 @@ START_TEST(tool_delayed_serial) } END_TEST +START_TEST(tool_capability) +{ + struct litest_device *dev = litest_current_device(); + struct libinput_device *device = dev->libinput_device; + + ck_assert(libinput_device_has_capability(device, + LIBINPUT_DEVICE_CAP_TABLET_TOOL)); +} +END_TEST + START_TEST(tool_capabilities) { struct libinput *li = litest_create_context(); @@ -3981,6 +3991,7 @@ void litest_setup_tests_tablet(void) { litest_add("tablet:tool", tool_ref, LITEST_TABLET | LITEST_TOOL_SERIAL, LITEST_ANY); + litest_add("tablet:tool", tool_capability, LITEST_TABLET, LITEST_ANY); litest_add_no_device("tablet:tool", tool_capabilities); litest_add("tablet:tool", tool_in_prox_before_start, LITEST_TABLET, LITEST_ANY); litest_add("tablet:tool_serial", tool_unique, LITEST_TABLET | LITEST_TOOL_SERIAL, LITEST_ANY);