Commit graph

10 commits

Author SHA1 Message Date
Peter Hutterer
2a1095924b Run clang-format over the code
This uses the .clang-format file in the follow-up commit, but committed
prior to that to ease review of said file and various integrations.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
2025-07-01 16:42:44 +10:00
Peter Hutterer
784312a494 test: add clang-format directives to prevent formatting
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1246>
2025-07-01 16:36:14 +10:00
Peter Hutterer
2ec9389a0d test: stringify the LITEST_ value as the device's name
This avoids inconsistencies between the LITEST_ enum value and the
shortname but also makes it easier to grep for any test cases that use
the same define. At the cost of the test names not looking very nice
anymore but oh well.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1157>
2025-03-13 05:57:37 +00:00
Peter Hutterer
0ccf43600c test: fix the ABS_Y handling for the Protocol A test device
No effect on the test results because we never use ABS_Y anyway for multitouch
devices.

Fixes #505

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-09 09:50:49 +10:00
Peter Hutterer
56f1ac2b72 test: make the custom touch override methods filter-able
Let those functions return true if they handled the event or false where they
didn't. This makes it more flexible to override touches in special cases only
and fall back to the normal litest handling otherwise.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-29 15:58:49 +10:00
Peter Hutterer
2edc7e37ac test: mark the protocol A device as touch device
Now that we're emulating everything correctly, let's mark it as proper touch
device.

Two test cases need to be excluded:
- double-down triggers an assert in the test device because this isn't
  possible this way with protocol A devices
- the axisrange warning test can't be triggered, mtdev clips those axes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-22 16:23:17 +10:00
Peter Hutterer
44702e947c test: switch the protocol A test device to be an actual protocol A device
This device mostly behaved like a normal touch device except for
SYN_MT_REPORT. Switch it to behave like a real protocol A device and adjust
the test accordingly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-22 16:23:17 +10:00
Peter Hutterer
2346801b0e test: switch to a TEST_DEVICE macro for all the litest test devices
The test device initialization code was a bit of duplicated boilerplate and
required adding a reference to the devices to the 'devices' list in litest.c.
Automate this with a new TEST_DEVICE macro that adds the devices to a custom
section in the binary, then loops throught that section to get the device out.

This reduces the boilerplate for each test device to just the TEST_MACRO and
the LITEST_foo device enum entry. It also now automates the shortname of the
device.

The device's shortname was standardised in this approach as well, lowercase
and dashes only.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-21 15:06:17 +10:00
Peter Hutterer
5d2501aa7d Drop HAVE_CONFIG_H ifdef
We have one. Yay. Lucky us. Go forth and celebrate.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-12-01 11:06:54 +10:00
Peter Hutterer
5c76e6f47f test: prefix all test device files with litest-device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-07-13 09:11:26 +10:00
Renamed from test/litest-protocol-a-touch-screen.c (Browse further)