diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-12 22:12:02 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-12 22:12:02 +0300 |
| commit | 94c5e361fbb229b0cd6853e2102a7d95f1f358b3 (patch) | |
| tree | 3c0f11af9dcb84dac8067a31a6979acd6dd56fbf /tests/test_api.cpp | |
| parent | 08dc9047098d6d96791024ac7d8f5837633673ef (diff) | |
better public interface and doxygen
Diffstat (limited to 'tests/test_api.cpp')
| -rw-r--r-- | tests/test_api.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
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 <yasl/timing.h> #include <yasl/yasl.h> @@ -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; } |
