weston/doc
Pekka Paalanen d47ae7351a tests: new test listing macros
This is a step towards getting rid of the __start_test_section and
__stop_test_section usage. The old macros assumed that all individual
variables assigned to the test section would be packed there as if in an
array. Mostly this seemed to work, too, with some magical alignment
fixes in the past. It was not guaranteed to work.

With the new test listing macros, we collect an actual array. The
drawback is that we need to mention all the test entry points explicitly
and they look like normal functions in the code - which they now are.
Their argument typing is safe, and their arguments are explicitly
visible. We rely on the compiler to complain about unused functions if
any entry point is forgotten from the array.

The array is still put into the test section, because this seems to be
the only feasible way of letting the harness code support both the old
and new test listing macros at the same time. This allows converting
each test program individually.

TESTFN_ARG() needs an explicit cast on the function pointer type,
because the data argument pointer type will not match const void*.

As an example of using the new macros, linalg-test.c is converted.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-05-28 16:29:56 +03:00
..
doxygen doc: Correct absolute path in doxygen graphs. 2015-10-07 17:09:09 -07:00
perfetto doc/perfetto: Add a simple perfetto out-of-tree trace config 2026-02-06 16:51:21 +02:00
scripts stream-pipewire: Add a helper script for the pipewire backend 2024-03-11 12:31:55 +00:00
sphinx tests: new test listing macros 2026-05-28 16:29:56 +03:00
style CI: a new style for LCOV reports 2021-04-17 11:53:16 +00:00
wayland-screenshot.jpg README: Move to Markdown, rewrite introduction 2018-08-07 14:38:24 +01:00