mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-30 16:28:17 +02:00
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> |
||
|---|---|---|
| .. | ||
| color-manager-client.c | ||
| color-manager-client.h | ||
| color_util.c | ||
| color_util.h | ||
| image-iter.h | ||
| lcms_util.c | ||
| lcms_util.h | ||
| meson.build | ||
| weston-test-assert.h | ||
| weston-test-client-helper.c | ||
| weston-test-client-helper.h | ||
| weston-test-desktop-shell.c | ||
| weston-test-fixture-compositor.c | ||
| weston-test-fixture-compositor.h | ||
| weston-test-runner.c | ||
| weston-test-runner.h | ||
| weston-test.c | ||
| weston-testsuite-data.h | ||
| xcb-client-helper.c | ||
| xcb-client-helper.h | ||
| xdg-client-helper.c | ||
| xdg-client-helper.h | ||