test: use litest_assert_empty_queue instead of a manual none check

This provides better debugging printfs and is the now-recommended way to
check this.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1050>
This commit is contained in:
Peter Hutterer 2024-09-18 14:57:51 +10:00
parent 86c47be816
commit f8e44f1947

View file

@ -1191,8 +1191,7 @@ START_TEST(clickpad_btn_left)
litest_event(dev, EV_KEY, BTN_LEFT, 0);
litest_event(dev, EV_SYN, SYN_REPORT, 0);
litest_dispatch(li);
ck_assert_int_eq(libinput_next_event_type(li), LIBINPUT_EVENT_NONE);
litest_assert_empty_queue(li);
}
END_TEST
@ -1211,8 +1210,7 @@ START_TEST(clickpad_click_n_drag)
litest_assert_button_event(li, BTN_LEFT,
LIBINPUT_BUTTON_STATE_PRESSED);
litest_dispatch(li);
ck_assert_int_eq(libinput_next_event_type(li), LIBINPUT_EVENT_NONE);
litest_assert_empty_queue(li);
/* now put a second finger down */
litest_touch_down(dev, 1, 70, 70);