test: move the x/y coords a bit when testing tool type switches
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 10 Sep 2020 23:31:20 +0000 (09:31 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 22 Sep 2020 07:35:41 +0000 (17:35 +1000)
More realistic, there's no way you can get the x/y coordinates exactly the
same when moving the pen back into prox.

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

index d0b728ec5e223261eff9fd4a0aa9a93e74bc348f..7feeb22c514eec94ad5ac056ccb9ff559f1fec4b 100644 (file)
@@ -2807,6 +2807,7 @@ START_TEST(tool_type)
                { -1, -1 }
        };
        struct tool_type_match *tt;
+       double x = 50, y = 50;
 
        litest_drain_events(li);
 
@@ -2821,7 +2822,7 @@ START_TEST(tool_type)
                        continue;
 
                litest_tablet_set_tool_type(dev, tt->code);
-               litest_tablet_proximity_in(dev, 50, 50, axes);
+               litest_tablet_proximity_in(dev, x, y, axes);
                libinput_dispatch(li);
 
                event = libinput_get_event(li);
@@ -2837,6 +2838,9 @@ START_TEST(tool_type)
 
                litest_tablet_proximity_out(dev);
                litest_drain_events(li);
+
+               x++;
+               y++;
        }
 }
 END_TEST