[PATCH libinput 1/7] test: drop sideways-component in two-finger scroll test

Hans de Goede hdegoede at redhat.com
Thu Jul 17 03:07:16 PDT 2014


Hi,
On 07/16/2014 07:18 AM, Peter Hutterer wrote:
> This breaks when we have a device resolution set on the test devices,
> specificially on the T440. The current tests use a delta of 1% of the device
> which with the resulution set results in an effective delta of 3 - above the
> scroll threshold.
>> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

IMHO it would be better to make all the test functions taking percentages to use
doubles for the percentage then, and use say 0.5 % .
The rest of the set looks good and is:
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
Regards,
Hans
> ---
> Doesn't break until 2/7 is applied.
>> test/touchpad.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>> diff --git a/test/touchpad.c b/test/touchpad.c
> index b7b31d6..a8e0d89 100644
> --- a/test/touchpad.c
> +++ b/test/touchpad.c
> @@ -1198,15 +1198,13 @@ START_TEST(touchpad_2fg_scroll)
>> 	litest_drain_events(li);
>> -	/* Note this mixes in a tiny amount of movement in the wrong direction,
> -	 which should be ignored */
> -	test_2fg_scroll(dev, 1, 40, 0);
> +	test_2fg_scroll(dev, 0, 40, 0);
> 	check_2fg_scroll(dev, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, 10);
> -	test_2fg_scroll(dev, 1, -40, 0);
> +	test_2fg_scroll(dev, 0, -40, 0);
> 	check_2fg_scroll(dev, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL, -10);
> -	test_2fg_scroll(dev, 40, 1, 0);
> +	test_2fg_scroll(dev, 40, 0, 0);
> 	check_2fg_scroll(dev, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, 10);
> -	test_2fg_scroll(dev, -40, 1, 0);
> +	test_2fg_scroll(dev, -40, 0, 0);
> 	check_2fg_scroll(dev, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL, -10);
>> 	/* 2fg scroll smaller than the threshold should not generate events */
>


More information about the wayland-devel mailing list

AltStyle によって変換されたページ (->オリジナル) /