test: Don't fail when events are enabled multiple times
authorJonas Ådahl <jadahl@gmail.com>
Mon, 14 Jul 2014 21:34:25 +0000 (23:34 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Mon, 18 Aug 2014 20:35:19 +0000 (22:35 +0200)
When overriding events of a test device, if one would enable an event
that was already enabled by default for the overridden device, an assert
checking if the event was already enabled would fail and cause the test
to fail.

Since the merging of the default and overriding event lists is implemented
by simply concatinating them letting libevdev deal with ignoring
superfluous event enabling, remove the assert to allow the implementation
to work.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
test/litest.c

index c058b6b..00db464 100644 (file)
@@ -900,8 +900,6 @@ litest_create_uinput_device_from_description(const char *name,
                if (type == INPUT_PROP_MAX) {
                        rc = libevdev_enable_property(dev, code);
                } else {
-                       if (type != EV_SYN)
-                               ck_assert(!libevdev_has_event_code(dev, type, code));
                        rc = libevdev_enable_event_code(dev, type, code,
                                                        type == EV_ABS ? &default_abs : NULL);
                }