diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-14 14:07:19 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-14 14:07:58 +0300 |
| commit | 04616d5cff135a3f2fa0dcd99c3d756b67312daa (patch) | |
| tree | 41507222a4a265acbe3f546cbe731d729e2a34d1 /tests/test_header_c11.c | |
| parent | 0eec911bdabb130415aeb2fc6eb4281b891a5d2f (diff) | |
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 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_header_c11.c')
| -rw-r--r-- | tests/test_header_c11.c | 11 |
1 files changed, 11 insertions, 0 deletions
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 <yasl/yasl.h> +#include <assert.h> + +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; +} |
