From 94c5e361fbb229b0cd6853e2102a7d95f1f358b3 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Mon, 12 Oct 2026 22:12:02 +0300 Subject: better public interface and doxygen --- tests/test_api.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/test_api.cpp') diff --git a/tests/test_api.cpp b/tests/test_api.cpp index 9fb8525..129a41e 100644 --- a/tests/test_api.cpp +++ b/tests/test_api.cpp @@ -5,6 +5,9 @@ #if YASL_HAS_X11 #include "yasl/native/x11.h" #endif +#if YASL_HAS_COCOA +#include "yasl/native/cocoa.h" +#endif #include "yasl/loop.h" #include #include @@ -28,6 +31,10 @@ int main() yasl_loop_destroy(loop); yasl_input_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)); assert(!yasl_display_drag_start(nullptr, nullptr, nullptr, nullptr, nullptr)); assert(!yasl_surface_drag_carry(nullptr, {0, 0})); @@ -42,5 +49,11 @@ int main() assert(!yasl_x11_surface_get_window(nullptr)); #endif +#if YASL_HAS_COCOA + assert(!yasl_cocoa_display_get_application(nullptr)); + assert(!yasl_cocoa_surface_get_window(nullptr)); + assert(!yasl_cocoa_surface_get_view(nullptr)); +#endif + return 0; } -- cgit v1.2.3