test: fix the litest_touch_move_to() step counter

We were undercounting by one, causing a slight jump by (step-distance * 2) on
the last event.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2017-08-30 14:49:05 +10:00
parent e0c0db22e4
commit 7a7595e044

View file

@ -1866,7 +1866,7 @@ litest_touch_move_to(struct litest_device *d,
double x_to, double y_to,
int steps, int sleep_ms)
{
for (int i = 1; i < steps - 1; i++) {
for (int i = 1; i < steps; i++) {
litest_touch_move(d, slot,
x_from + (x_to - x_from)/steps * i,
y_from + (y_to - y_from)/steps * i);