diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2018-08-28 09:16:52 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2018-08-28 11:26:12 +1000 |
commit | 7768d7d981b8ac3917bc9d22fa1aac4756ab60ef (patch) | |
tree | a5db64605b6b51002d526acf8a0f0aa71e511eb5 /test/test-switch.c | |
parent | 20a9c38db07aba75e72b6f15ed77ad0ec629d82f (diff) |
test: drop the sleep_ms argument
This forces events for every ~10ms now. If we want a slower movement, we need
more steps - just like a real touchpad does it.
Cocinelle spatch files were variants of:
@@
expression A, B, C, D, E, F, G, H, I, J, K;
@@
- litest_touch_move_two_touches(A, B, C, D, E, F, G, H, I)
+ litest_touch_move_two_touches(A, B, C, D, E, F, G, H)
The only test that needed a real fix was touchpad_no_palm_detect_2fg_scroll,
it used 12ms before, now it's using 10ms so on the bcm5974 touchpad the second
finger was a speed-thumb. Increasing the events and thus slowing down the
pointer means it's a normal finger and the test succeeds again.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test/test-switch.c')
-rw-r--r-- | test/test-switch.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/test/test-switch.c b/test/test-switch.c index c7431bf5..5af9ac33 100644 --- a/test/test-switch.c +++ b/test/test-switch.c @@ -260,7 +260,7 @@ START_TEST(switch_disable_touchpad) litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -269,7 +269,7 @@ START_TEST(switch_disable_touchpad) litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -292,13 +292,13 @@ START_TEST(switch_disable_touchpad_during_touch) litest_drain_events(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 5); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); litest_switch_action(sw, which, LIBINPUT_SWITCH_STATE_ON); litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); - litest_touch_move_to(touchpad, 0, 70, 50, 50, 50, 5, 0); + litest_touch_move_to(touchpad, 0, 70, 50, 50, 50, 5); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -330,11 +330,11 @@ START_TEST(switch_disable_touchpad_edge_scroll) libinput_dispatch(li); litest_assert_empty_queue(li); - litest_touch_move_to(touchpad, 0, 99, 20, 99, 80, 60, 10); + litest_touch_move_to(touchpad, 0, 99, 20, 99, 80, 60); libinput_dispatch(li); litest_assert_empty_queue(li); - litest_touch_move_to(touchpad, 0, 99, 80, 99, 20, 60, 10); + litest_touch_move_to(touchpad, 0, 99, 80, 99, 20, 60); litest_touch_up(touchpad, 0); libinput_dispatch(li); litest_assert_empty_queue(li); @@ -362,7 +362,7 @@ START_TEST(switch_disable_touchpad_edge_scroll_interrupt) litest_touch_down(touchpad, 0, 99, 20); libinput_dispatch(li); litest_timeout_edgescroll(); - litest_touch_move_to(touchpad, 0, 99, 20, 99, 30, 10, 10); + litest_touch_move_to(touchpad, 0, 99, 20, 99, 30, 10); libinput_dispatch(li); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_AXIS); @@ -400,7 +400,7 @@ START_TEST(switch_disable_touchpad_already_open) /* default: switch is off - motion events */ litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -409,7 +409,7 @@ START_TEST(switch_disable_touchpad_already_open) litest_assert_empty_queue(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); @@ -438,7 +438,7 @@ START_TEST(switch_dont_resume_disabled_touchpad) litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -447,7 +447,7 @@ START_TEST(switch_dont_resume_disabled_touchpad) litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -473,7 +473,7 @@ START_TEST(switch_dont_resume_disabled_touchpad_external_mouse) litest_drain_events(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -482,7 +482,7 @@ START_TEST(switch_dont_resume_disabled_touchpad_external_mouse) litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -491,7 +491,7 @@ START_TEST(switch_dont_resume_disabled_touchpad_external_mouse) litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -567,7 +567,7 @@ START_TEST(lid_open_on_key_touchpad_enabled) litest_timeout_dwt_long(); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 70, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 70, 10); litest_touch_up(touchpad, 0); libinput_dispatch(li); @@ -847,7 +847,7 @@ START_TEST(tablet_mode_disable_touchpad_on_init) litest_drain_events(li); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_empty_queue(li); @@ -857,7 +857,7 @@ START_TEST(tablet_mode_disable_touchpad_on_init) litest_assert_only_typed_events(li, LIBINPUT_EVENT_SWITCH_TOGGLE); litest_touch_down(touchpad, 0, 50, 50); - litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10, 0); + litest_touch_move_to(touchpad, 0, 50, 50, 70, 50, 10); litest_touch_up(touchpad, 0); litest_assert_only_typed_events(li, LIBINPUT_EVENT_POINTER_MOTION); |