From 04616d5cff135a3f2fa0dcd99c3d756b67312daa Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Wed, 14 Oct 2026 14:07:19 +0300 Subject: Test pre-init public API, header portability and integration requests Add tests/common/test_public_api.c: before yasl_init, argument errors are reported first, owner-thread calls fail with ENODEV, queries return their documented fallbacks, yasl_drop_next_path parses a crafted text/uri-list, yasl_get_system_string follows its length and NUL rules, and yasl_wake is a no-op with no display. Build tests/test_header_c11.c as strict C11 and C17 with -pedantic-errors. Extend the surface integration test, run on weston and Xwayland, with title, window requests, bell, desktop queries, drag cancel, input-less move/menu/drag calls, a popup (its parent's destroy must also remove it, checked through the display's surface list), and a clipboard round trip. Run tests/x11/test_input.c in the X11 phase of run_surfaces.py through an optional trailing argument. Co-Authored-By: Claude Haiku 5.5 --- tests/test_header_c11.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/test_header_c11.c (limited to 'tests/test_header_c11.c') diff --git a/tests/test_header_c11.c b/tests/test_header_c11.c new file mode 100644 index 0000000..515a914 --- /dev/null +++ b/tests/test_header_c11.c @@ -0,0 +1,11 @@ +/* Built as strict C11 and C17 with -pedantic-errors: the public header must not need newer C. */ +#include +#include + +int main(void) +{ + enum yasl_backend backend = YASL_BACKEND_AUTO; + struct yasl_surface_options options = {.title = "portable", .width = 64, .height = 64}; + assert(backend == 0 && options.type == YASL_SURFACE_CPU && YASL_VERSION_MAJOR == 0); + return 0; +} -- cgit v1.2.3