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/test_api.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/test_api.cpp') diff --git a/tests/test_api.cpp b/tests/test_api.cpp index c45932a..c5921e6 100644 --- a/tests/test_api.cpp +++ b/tests/test_api.cpp @@ -38,12 +38,12 @@ int main() assert(yasl_loop_step(loop, 0) >= 0); yasl_loop_destroy(loop); - yasl_input_event event{}; + yasl_event event{}; event.key.key = YASL_KEY_A; assert(event.key.key == YASL_KEY_A); - event.mouse.scroll = {0.25, -0.5}; - assert(event.mouse.scroll.x == 0.25 && event.mouse.scroll.y == -0.5); - assert(!yasl_surface_input_poll(nullptr, &event)); + event.pointer.scroll = {0.25, -0.5}; + assert(event.pointer.scroll.x == 0.25 && event.pointer.scroll.y == -0.5); + assert(!yasl_surface_poll_event(nullptr, &event)); assert(!yasl_display_drag_start(nullptr, nullptr, nullptr, nullptr, nullptr)); assert(!yasl_surface_drag_carry(nullptr, {0, 0})); -- cgit v1.2.3