summaryrefslogtreecommitdiff
path: root/tests/test_api.cpp
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-13 15:41:39 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-13 15:41:39 +0300
commit482f799d356a8fbb8f585c4de7cc0992b8dc6fd3 (patch)
tree85551a69e3c356da7b9b514224e25a6c2f8d29b9 /tests/test_api.cpp
parent537b2d768b31deb0f95c5122e0d562e4406ae9a0 (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_api.cpp')
-rw-r--r--tests/test_api.cpp8
1 files changed, 4 insertions, 4 deletions
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}));