test: switch touch points around for semi-mt tap-n-drag testing
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 18 Dec 2014 03:52:36 +0000 (13:52 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 23 Dec 2014 01:14:39 +0000 (11:14 +1000)
The tests ignored it when motion events never happened - but that's mostly
what these tests are about. This only happened for semi-mt devices that use
the bounding box only, not separate touch points. Switching the touch points
around that the bounding box doesn't interfere causes the test to work as
expected.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/touchpad.c

index 84b3080..e6f0eb6 100644 (file)
@@ -211,11 +211,11 @@ START_TEST(touchpad_2fg_tap_n_drag)
 
        litest_drain_events(li);
 
-       litest_touch_down(dev, 0, 50, 50);
+       litest_touch_down(dev, 0, 30, 70);
        litest_touch_up(dev, 0);
-       litest_touch_down(dev, 0, 50, 50);
-       litest_touch_down(dev, 1, 60, 50);
-       litest_touch_move_to(dev, 0, 50, 50, 80, 80, 5, 40);
+       litest_touch_down(dev, 0, 30, 70);
+       litest_touch_down(dev, 1, 80, 70);
+       litest_touch_move_to(dev, 0, 30, 70, 30, 30, 5, 40);
        libinput_dispatch(li);
 
        litest_assert_button_event(li, BTN_LEFT,
@@ -250,11 +250,11 @@ START_TEST(touchpad_2fg_tap_n_drag_3fg_btntool)
 
        litest_drain_events(li);
 
-       litest_touch_down(dev, 0, 50, 50);
+       litest_touch_down(dev, 0, 30, 70);
        litest_touch_up(dev, 0);
-       litest_touch_down(dev, 0, 50, 50);
-       litest_touch_down(dev, 1, 60, 50);
-       litest_touch_move_to(dev, 0, 50, 50, 80, 80, 5, 40);
+       litest_touch_down(dev, 0, 30, 70);
+       litest_touch_down(dev, 1, 80, 90);
+       litest_touch_move_to(dev, 0, 30, 70, 30, 30, 5, 40);
        libinput_dispatch(li);
 
        litest_assert_button_event(li, BTN_LEFT,