diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2020-10-08 12:27:37 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2020-10-08 12:45:10 +1000 |
commit | 546b7623a33597b0517b845afe1119a9840c4e69 (patch) | |
tree | 1928781b874f35c7de3039ccf16144c010fcaa53 /test | |
parent | a80fe325032053792c7ee14d77f76cd41c4c47f7 (diff) | |
download | libinput-546b7623a33597b0517b845afe1119a9840c4e69.tar.gz |
test: fix the tablet relative calibration test
This test only worked because axis smoothing mangled the coordinates, moving
from 5/10 to 10/20 cannot possibly have a dx of zero.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test')
-rw-r--r-- | test/test-tablet.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/test/test-tablet.c b/test/test-tablet.c index a0a8de83..0c4fbea7 100644 --- a/test/test-tablet.c +++ b/test/test-tablet.c @@ -4682,6 +4682,12 @@ START_TEST(relative_calibration) ck_assert(dy == 0.0); libinput_event_destroy(event); + /* work around axis smoothing */ + litest_tablet_motion(dev, 19, 10, axes); + litest_tablet_motion(dev, 18, 10, axes); + litest_tablet_motion(dev, 17, 10, axes); + litest_drain_events(li); + litest_tablet_motion(dev, 5, 10, axes); libinput_dispatch(li); event = libinput_get_event(li); @@ -4693,7 +4699,13 @@ START_TEST(relative_calibration) ck_assert(dy == 0.0); libinput_event_destroy(event); - litest_tablet_motion(dev, 10, 20, axes); + /* work around axis smoothing */ + litest_tablet_motion(dev, 5, 11, axes); + litest_tablet_motion(dev, 5, 12, axes); + litest_tablet_motion(dev, 5, 13, axes); + litest_drain_events(li); + + litest_tablet_motion(dev, 5, 20, axes); libinput_dispatch(li); event = libinput_get_event(li); tev = litest_is_tablet_event(event, @@ -4704,7 +4716,13 @@ START_TEST(relative_calibration) ck_assert(dy < 0.0); libinput_event_destroy(event); - litest_tablet_motion(dev, 10, 5, axes); + /* work around axis smoothing */ + litest_tablet_motion(dev, 5, 19, axes); + litest_tablet_motion(dev, 5, 18, axes); + litest_tablet_motion(dev, 5, 17, axes); + litest_drain_events(li); + + litest_tablet_motion(dev, 5, 5, axes); libinput_dispatch(li); event = libinput_get_event(li); tev = litest_is_tablet_event(event, |