From db0a2be1a023294000791fd0cb3d72f951045f02 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 12 Feb 2021 09:29:24 +1000 Subject: test: move a helper function close to its caller This is a custom log function for one single test, let's move it next to that test. Signed-off-by: Peter Hutterer --- test/test-tablet.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/test/test-tablet.c b/test/test-tablet.c index dce50ca0..462b5fe2 100644 --- a/test/test-tablet.c +++ b/test/test-tablet.c @@ -4008,18 +4008,6 @@ START_TEST(tablet_pressure_offset_increase) } END_TEST -static void pressure_threshold_warning(struct libinput *libinput, - enum libinput_log_priority priority, - const char *format, - va_list args) -{ - int *warning_triggered = (int*)libinput_get_user_data(libinput); - - if (priority == LIBINPUT_LOG_PRIORITY_ERROR && - strstr(format, "pressure offset greater")) - (*warning_triggered)++; -} - START_TEST(tablet_pressure_min_max) { struct litest_device *dev = litest_current_device(); @@ -4107,6 +4095,19 @@ START_TEST(tablet_pressure_range) } END_TEST +static void +pressure_threshold_warning(struct libinput *libinput, + enum libinput_log_priority priority, + const char *format, + va_list args) +{ + int *warning_triggered = (int*)libinput_get_user_data(libinput); + + if (priority == LIBINPUT_LOG_PRIORITY_ERROR && + strstr(format, "pressure offset greater")) + (*warning_triggered)++; +} + START_TEST(tablet_pressure_offset_exceed_threshold) { struct litest_device *dev = litest_current_device(); -- cgit v1.2.3