From f8e44f19479d7bf70df26ab09e3b9a622b591bd2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 18 Sep 2024 14:57:51 +1000 Subject: [PATCH] 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: --- test/test-touchpad-buttons.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/test-touchpad-buttons.c b/test/test-touchpad-buttons.c index a8122803..4aea7574 100644 --- a/test/test-touchpad-buttons.c +++ b/test/test-touchpad-buttons.c @@ -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);