[PATCH libinput 03/17] test: add litest_add_device()

Peter Hutterer peter.hutterer at who-t.net
Tue Sep 2 19:02:54 PDT 2014


For adding a litest device to an existing context.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 test/litest.c | 12 ++++++++++++
 test/litest.h |  2 ++
 2 files changed, 14 insertions(+)

diff --git a/test/litest.c b/test/litest.c
index 2cea83c..890b7e0 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -564,6 +564,18 @@ litest_add_device_with_overrides(struct libinput *libinput,
 }
 
 struct litest_device *
+litest_add_device(struct libinput *libinput,
+		  enum litest_device_type which)
+{
+	return litest_add_device_with_overrides(libinput,
+						which,
+						NULL,
+						NULL,
+						NULL,
+						NULL);
+}
+
+struct litest_device *
 litest_create_device_with_overrides(enum litest_device_type which,
 				    const char *name_override,
 				    struct input_id *id_override,
diff --git a/test/litest.h b/test/litest.h
index cc55c8f..11a230b 100644
--- a/test/litest.h
+++ b/test/litest.h
@@ -88,6 +88,8 @@ void litest_add_no_device(const char *name, void *func);
 
 int litest_run(int argc, char **argv);
 struct litest_device * litest_create_device(enum litest_device_type which);
+struct litest_device * litest_add_device(struct libinput *libinput,
+					 enum litest_device_type which);
 struct libevdev_uinput *
 litest_create_uinput_device_from_description(const char *name,
 					     const struct input_id *id,
-- 
1.9.3



More information about the wayland-devel mailing list