test/testevdev.c


Log

Author Commit Date CI Message
Simon McVittie 7d230af5 2022-10-12T12:41:30 testevdev: Explain why the test data is encoded the way it is Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 81dee319 2022-10-12T12:36:41 testevdev: Add a static assertion for supported sizeof(long) If this assertion fails on some platform (unlikely), we will need a third implementation for SwapLongLE(). Signed-off-by: Simon McVittie <smcv@collabora.com>
Helge Deller fb32effd 2022-10-09T12:13:23 testevdev: Fix detection of word size The check for whether to use a 32- or 64-bit swap for an array of long values always took the 64-bit path, because <limits.h> wasn't included and therefore ULONG_MAX wasn't defined. Turn this into a runtime check, which a reasonable compiler will optimize into a constant. This fixes testevdev failures on 32-bit big-endian platforms such as hppa and older powerpc. Little-endian and/or 64-bit platforms are unaffected. [smcv: Added commit message] Bug-Debian: https://bugs.debian.org/1021310 Co-authored-by: Simon McVittie <smcv@collabora.com>
Simon McVittie b299f74d 2022-05-04T15:34:41 test: Make testevdev succeed if the feature is disabled "Not applicable" is more like success than it is like failure. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie b4256d03 2022-04-12T14:25:26 testevdev: Adapt to a broader definition of keyboards At the time I contributed this unit test, SDL had a relatively narrow definition of what is a keyboard, approximately matching udev ID_INPUT_KEYBOARD. Now it uses the equivalent of udev ID_INPUT_KEY, which matches anything with keyboard keys, and not just reasonably complete alphanumeric keyboards. Fixes: 040bd7a9 "Fix udev not detecting ID_INPUT_KEY devices when udev is not running" Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie c2946902 2022-04-12T14:16:29 testevdev: Recognise touchpads as such At the time I contributed this unit test, SDL didn't understand Linux touchpads, but now it does. Fixes: 373216ae "Added support for touchpads in the Linux evdev code" Signed-off-by: Simon McVittie <smcv@collabora.com>
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
Sam Lantinga e6a4230d 2021-11-23T03:51:32 Revert testevdev libc changes This file uses internal SDL headers as a hack, without actually being built as part of SDL, so we should use normal C functions here.
Sylvain d31251b0 2021-11-21T22:30:48 use SDL's functions version inplace of libc version
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Simon McVittie 65847539 2020-11-11T19:15:43 test: Add a unit test for input device classification heuristics This uses pre-recorded evdev capabilities, so that we can check for regressions without the devices having to be physically present. Signed-off-by: Simon McVittie <smcv@collabora.com>