test: mark the protocol A device as touch device
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 22 Mar 2019 06:21:08 +0000 (16:21 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Fri, 22 Mar 2019 06:23:17 +0000 (16:23 +1000)
Now that we're emulating everything correctly, let's mark it as proper touch
device.

Two test cases need to be excluded:
- double-down triggers an assert in the test device because this isn't
  possible this way with protocol A devices
- the axisrange warning test can't be triggered, mtdev clips those axes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/litest-device-protocol-a-touch-screen.c
test/test-log.c
test/test-touch.c

index 3e173548bd362e6f54652348cd42684310d72a69..258955c89272236e318de3eb3526347f79dafc00 100644 (file)
@@ -197,7 +197,7 @@ static int events[] = {
 
 TEST_DEVICE("protocol-a",
        .type = LITEST_PROTOCOL_A_SCREEN,
-       .features = LITEST_PROTOCOL_A,
+       .features = LITEST_PROTOCOL_A|LITEST_TOUCH,
        .create = protocolA_create,
 
        .interface = &interface,
index 649cd1ba7ce9cedb296d50138f750f7199d3bd5f..7b035d30a6abe598d9d8c90152ccbe4c9c8c3146 100644 (file)
@@ -209,6 +209,7 @@ TEST_COLLECTION(log)
        litest_add_deviceless("log:logging", log_handler_NULL);
        litest_add_no_device("log:logging", log_priority);
 
-       litest_add_ranged("log:warnings", log_axisrange_warning, LITEST_TOUCH, LITEST_ANY, &axes);
+       /* mtdev clips to axis ranges */
+       litest_add_ranged("log:warnings", log_axisrange_warning, LITEST_TOUCH, LITEST_PROTOCOL_A, &axes);
        litest_add_ranged("log:warnings", log_axisrange_warning, LITEST_TOUCHPAD, LITEST_ANY, &axes);
 }
index 691763cf18786e3226029f15ec6a9f6fdc4d4742..99419783f0b296cf3fbf336a0b9bbcd05cceec6c 100644 (file)
@@ -1297,7 +1297,7 @@ TEST_COLLECTION(touch)
        litest_add_no_device("touch:abs-transform", touch_abs_transform);
        litest_add("touch:slots", touch_seat_slot, LITEST_TOUCH, LITEST_TOUCHPAD);
        litest_add_no_device("touch:slots", touch_many_slots);
-       litest_add("touch:double-touch-down-up", touch_double_touch_down_up, LITEST_TOUCH, LITEST_ANY);
+       litest_add("touch:double-touch-down-up", touch_double_touch_down_up, LITEST_TOUCH, LITEST_PROTOCOL_A);
        litest_add("touch:calibration", touch_calibration_scale, LITEST_TOUCH, LITEST_TOUCHPAD);
        litest_add("touch:calibration", touch_calibration_scale, LITEST_SINGLE_TOUCH, LITEST_TOUCHPAD);
        litest_add("touch:calibration", touch_calibration_rotation, LITEST_TOUCH, LITEST_TOUCHPAD);