mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 02:10:07 +01:00
test: switch another test to use logcapture
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1284>
This commit is contained in:
parent
d9a4667a14
commit
ce85ee7d35
1 changed files with 18 additions and 15 deletions
|
|
@ -839,25 +839,28 @@ START_TEST(pointer_scroll_wheel_hires_send_only_lores)
|
|||
* sure we handle this correctly.
|
||||
*/
|
||||
litest_drain_events(dev->libinput);
|
||||
litest_set_log_handler_bug(li);
|
||||
litest_with_logcapture(li, capture) {
|
||||
litest_event(dev, EV_REL, lores_code, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
test_high_and_low_wheel_events_value(dev, lores_code, direction * 120);
|
||||
|
||||
litest_event(dev, EV_REL, lores_code, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
test_high_and_low_wheel_events_value(dev, lores_code, direction * 120);
|
||||
litest_event(dev, EV_REL, lores_code, -1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
test_high_and_low_wheel_events_value(dev, lores_code, direction * -120);
|
||||
|
||||
litest_event(dev, EV_REL, lores_code, -1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
test_high_and_low_wheel_events_value(dev, lores_code, direction * -120);
|
||||
litest_event(dev, EV_REL, lores_code, 2);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
test_high_and_low_wheel_events_value(dev, lores_code, direction * 240);
|
||||
|
||||
litest_event(dev, EV_REL, lores_code, 2);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
litest_dispatch(li);
|
||||
test_high_and_low_wheel_events_value(dev, lores_code, direction * 240);
|
||||
litest_assert_empty_queue(li);
|
||||
|
||||
litest_assert_empty_queue(li);
|
||||
litest_restore_log_handler(li);
|
||||
litest_assert_strv_substring(
|
||||
capture->bugs,
|
||||
"only low-resolution events have been received.");
|
||||
}
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue