From 482f799d356a8fbb8f585c4de7cc0992b8dc6fd3 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Tue, 13 Oct 2026 15:41:39 +0300 Subject: Migrate tests to the unified event API Port backend, input, tablet and app tests from yasl_input_event and YASL_INPUT_* to struct yasl_event and YASL_EVENT_*. The input allocation test links input.c on its own, so it stubs yasl_loop_now_ns() for the new event timestamps. Co-Authored-By: Claude Opus 5.5 --- tests/wayland/test_cursor.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/wayland/test_cursor.c') diff --git a/tests/wayland/test_cursor.c b/tests/wayland/test_cursor.c index a4a522e..eb729a3 100644 --- a/tests/wayland/test_cursor.c +++ b/tests/wayland/test_cursor.c @@ -76,14 +76,14 @@ int main(void) pointer_frame(&seat, seat.pointer); tablet_tool_motion(&tool, tool.proxy, wl_fixed_from_int(56), wl_fixed_from_int(78)); tool_frame(&tool, tool.proxy, 0); - struct yasl_input_event event; - assert(yasl_surface_input_poll(&surface.base, &event)); - assert(event.kind == YASL_INPUT_MOUSE && event.mouse.device == YASL_PTR_DEV_MOUSE); - assert(event.mouse.pos.x == 12 && event.mouse.pos.y == 34); - assert(yasl_surface_input_poll(&surface.base, &event)); - assert(event.kind == YASL_INPUT_MOUSE && event.mouse.device == YASL_PTR_DEV_PEN); - assert(event.mouse.pos.x == 56 && event.mouse.pos.y == 78); - assert(!yasl_surface_input_poll(&surface.base, &event)); + struct yasl_event event; + assert(yasl_surface_poll_event(&surface.base, &event)); + assert(event.type == YASL_EVENT_POINTER_MOTION && event.pointer.device == YASL_PTR_DEV_MOUSE); + assert(event.pointer.pos.x == 12 && event.pointer.pos.y == 34); + assert(yasl_surface_poll_event(&surface.base, &event)); + assert(event.type == YASL_EVENT_POINTER_MOTION && event.pointer.device == YASL_PTR_DEV_PEN); + assert(event.pointer.pos.x == 56 && event.pointer.pos.y == 78); + assert(!yasl_surface_poll_event(&surface.base, &event)); /* Each new entry needs a request with its own serial. */ pointer_leave(&seat, seat.pointer, 12, surface.surface); -- cgit v1.2.3