From 972368356c9e893cd95534136d0e19979435fa02 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 26 May 2026 14:52:59 +0000 Subject: [PATCH] tests/touch-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/touch-test.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/touch-test.c b/tests/touch-test.c index 502e3dfab..4b03cc3f4 100644 --- a/tests/touch-test.c +++ b/tests/touch-test.c @@ -92,7 +92,8 @@ send_touch(struct client *client, const struct timespec *time, client_roundtrip(client); } -TEST(broken_touch_event) +static enum test_result_code +broken_touch_event(struct wet_testsuite_data *suite_data) { struct client *client = create_touch_test_client(); struct input_timestamps *input_ts = @@ -107,7 +108,8 @@ TEST(broken_touch_event) return RESULT_OK; } -TEST(touch_events) +static enum test_result_code +touch_events(struct wet_testsuite_data *suite_data) { struct client *client = create_touch_test_client(); struct touch *touch = client->input->touch; @@ -133,7 +135,8 @@ TEST(touch_events) return RESULT_OK; } -TEST(touch_timestamps_stop_after_input_timestamps_object_is_destroyed) +static enum test_result_code +touch_timestamps_stop_after_input_timestamps_object_is_destroyed(struct wet_testsuite_data *suite_data) { struct client *client = create_touch_test_client(); struct touch *touch = client->input->touch; @@ -155,7 +158,8 @@ TEST(touch_timestamps_stop_after_input_timestamps_object_is_destroyed) return RESULT_OK; } -TEST(touch_timestamps_stop_after_client_releases_wl_touch) +static enum test_result_code +touch_timestamps_stop_after_client_releases_wl_touch(struct wet_testsuite_data *suite_data) { struct client *client = create_touch_test_client(); struct touch *touch = client->input->touch; @@ -185,3 +189,10 @@ TEST(touch_timestamps_stop_after_client_releases_wl_touch) return RESULT_OK; } + +DECLARE_TEST_LIST( + TESTFN(broken_touch_event), + TESTFN(touch_events), + TESTFN(touch_timestamps_stop_after_input_timestamps_object_is_destroyed), + TESTFN(touch_timestamps_stop_after_client_releases_wl_touch), +);