From 192a396fe6b1a7a5df8bdf8b9c67c02c6439e9be Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 26 May 2026 14:52:59 +0000 Subject: [PATCH] tests/kiosk-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/kiosk-shell-test.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/kiosk-shell-test.c b/tests/kiosk-shell-test.c index 2122e222d..3f1d20215 100644 --- a/tests/kiosk-shell-test.c +++ b/tests/kiosk-shell-test.c @@ -83,9 +83,9 @@ assert_surface_is_background(struct wet_testsuite_data *suite_data, test_assert_str_eq(surface->label, "kiosk shell background surface"); } -TEST(two_surface_switching) +static enum test_result_code +two_surface_switching(struct wet_testsuite_data *suite_data) { - struct wet_testsuite_data *suite_data = TEST_GET_SUITE_DATA(); struct xdg_client *xdg_client = create_xdg_client(); struct xdg_surface_data *xdg_surface1, *xdg_surface2; struct input *input; @@ -246,9 +246,9 @@ TEST(two_surface_switching) return RESULT_OK; } -TEST(top_surface_present_in_output_repaint) +static enum test_result_code +top_surface_present_in_output_repaint(struct wet_testsuite_data *suite_data) { - struct wet_testsuite_data *suite_data = TEST_GET_SUITE_DATA(); struct xdg_client *xdg_client = create_xdg_client(); struct xdg_surface_data *xdg_surface = create_xdg_surface(xdg_client); @@ -302,9 +302,9 @@ TEST(top_surface_present_in_output_repaint) return RESULT_OK; } -TEST(test_surface_unmaps_on_null) +static enum test_result_code +test_surface_unmaps_on_null(struct wet_testsuite_data *suite_data) { - struct wet_testsuite_data *suite_data = TEST_GET_SUITE_DATA(); struct xdg_client *xdg_client = create_xdg_client(); struct xdg_surface_data *xdg_surface = create_xdg_surface(xdg_client);; @@ -393,3 +393,9 @@ TEST(test_surface_unmaps_on_null) return RESULT_OK; } + +DECLARE_TEST_LIST( + TESTFN(two_surface_switching), + TESTFN(top_surface_present_in_output_repaint), + TESTFN(test_surface_unmaps_on_null), +);