ABS_MT_TOOL_TYPE values are an enum, not a numerical value like all other
axes. So let's allow converting those values to string.
Fixes https://gitlab.freedesktop.org/libevdev/libevdev/issues/1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Some of the *_MAX names are duplicates and have a real define. These were not
resolved until now.
Fixes https://gitlab.freedesktop.org/libevdev/libevdev/issues/3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Move all tests to a special section, then loop through that section
to fetch all test suite. The result is that new tests only need to add the
source files without having to update everything else as well.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
They have the same value, so the _MAX code would shadow the real code, causing
issues in any client that needs to get all event names from libevdev.
Specifically, the loop of:
for each code in 0 to max-for-type:
print(name)
would not show up the code (but the _MAX) code instead. This causes issues
with clients that rely on name resolution that works. And the _MAX values are
special values anyway.
Blacklist it in the script here, causing it to resolve from name to code, but
not from code to name (like other duplicated codes).
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
12717d79 "Add libevdev_event_type/code_from_name() resolvers" added the
lookup functions for types and codes, this commit adds the missing ones for
input properties.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
A simple ck_assert() just fails, a ck_assert_int_eq() also shows the two
values. Makes failures a bit easier to debug.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
A bunch of tests for the new name resolver.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>