From 2edc7e37acf7f4bd0b20d5b24b7db0f5e02076fa Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 22 Mar 2019 16:21:08 +1000 Subject: [PATCH] test: mark the protocol A device as touch device 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 --- test/litest-device-protocol-a-touch-screen.c | 2 +- test/test-log.c | 3 ++- test/test-touch.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/litest-device-protocol-a-touch-screen.c b/test/litest-device-protocol-a-touch-screen.c index 3e173548..258955c8 100644 --- a/test/litest-device-protocol-a-touch-screen.c +++ b/test/litest-device-protocol-a-touch-screen.c @@ -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, diff --git a/test/test-log.c b/test/test-log.c index 649cd1ba..7b035d30 100644 --- a/test/test-log.c +++ b/test/test-log.c @@ -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); } diff --git a/test/test-touch.c b/test/test-touch.c index 691763cf..99419783 100644 --- a/test/test-touch.c +++ b/test/test-touch.c @@ -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);