From: Jonas Ådahl Date: Mon, 14 Jul 2014 21:34:25 +0000 (+0200) Subject: test: Don't fail when events are enabled multiple times X-Git-Tag: 0.6.0~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3f39004a2e36461c508b76a645368d5613062a5;hp=ec0161eda336439bcd502f00fb1e3481617c3f2a;p=platform%2Fupstream%2Flibinput.git test: Don't fail when events are enabled multiple times 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 Reviewed-by: Peter Hutterer --- diff --git a/test/litest.c b/test/litest.c index c058b6b..00db464 100644 --- a/test/litest.c +++ b/test/litest.c @@ -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); }