From 610a7f9aa7965c09e74e026d1de2cff9ec51cf87 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 26 May 2026 14:52:59 +0000 Subject: [PATCH] tests/xdg-shell-test: migrate to DECLARE_TEST_LIST API Replace TEST() macros with explicit static functions and DECLARE_TEST_LIST() registration for better type safety and to prepare for removing the custom ELF section. Co-authored-by: Claude Sonnet 4.6 Signed-off-by: Pekka Paalanen --- tests/xdg-shell-test.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/tests/xdg-shell-test.c b/tests/xdg-shell-test.c index 69278c2d2..1f8b3b77c 100644 --- a/tests/xdg-shell-test.c +++ b/tests/xdg-shell-test.c @@ -56,7 +56,8 @@ fixture_setup(struct weston_test_harness *harness) } DECLARE_FIXTURE_SETUP(fixture_setup); -TEST(initial_commit_without_a_buffer) +static enum test_result_code +initial_commit_without_a_buffer(struct wet_testsuite_data *suite_data) { struct xdg_client *xdg_client = create_xdg_client(); struct xdg_surface_data *xdg_surface = create_xdg_surface(xdg_client); @@ -72,7 +73,8 @@ TEST(initial_commit_without_a_buffer) return RESULT_OK; } -TEST(initial_commit_with_a_buffer) +static enum test_result_code +initial_commit_with_a_buffer(struct wet_testsuite_data *suite_data) { struct xdg_client *xdg_client = create_xdg_client(); struct xdg_surface_data *xdg_surface = create_xdg_surface(xdg_client); @@ -92,7 +94,8 @@ TEST(initial_commit_with_a_buffer) return RESULT_OK; } -TEST(initial_commit_with_fullscreen_state) +static enum test_result_code +initial_commit_with_fullscreen_state(struct wet_testsuite_data *suite_data) { struct xdg_client *xdg_client = create_xdg_client(); struct xdg_surface_data *xdg_surface = create_xdg_surface(xdg_client); @@ -112,7 +115,8 @@ TEST(initial_commit_with_fullscreen_state) return RESULT_OK; } -TEST(initial_commit_with_max_state) +static enum test_result_code +initial_commit_with_max_state(struct wet_testsuite_data *suite_data) { struct xdg_client *xdg_client = create_xdg_client(); struct xdg_surface_data *xdg_surface = create_xdg_surface(xdg_client); @@ -132,7 +136,8 @@ TEST(initial_commit_with_max_state) return RESULT_OK; } -TEST(initial_commit_without_a_buffer_subsurface) +static enum test_result_code +initial_commit_without_a_buffer_subsurface(struct wet_testsuite_data *suite_data) { struct xdg_client *xdg_client = create_xdg_client(); struct xdg_surface_data *xdg_surface = create_xdg_surface(xdg_client); @@ -183,7 +188,8 @@ TEST(initial_commit_without_a_buffer_subsurface) return RESULT_OK; } -TEST(defunct_surfaces) +static enum test_result_code +defunct_surfaces(struct wet_testsuite_data *suite_data) { struct xdg_client *xdg_client = create_xdg_client(); struct xdg_surface_data *xdg_surface = create_xdg_surface(xdg_client); @@ -205,3 +211,12 @@ TEST(defunct_surfaces) return RESULT_OK; } + +DECLARE_TEST_LIST( + TESTFN(initial_commit_without_a_buffer), + TESTFN(initial_commit_with_a_buffer), + TESTFN(initial_commit_with_fullscreen_state), + TESTFN(initial_commit_with_max_state), + TESTFN(initial_commit_without_a_buffer_subsurface), + TESTFN(defunct_surfaces), +);