diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2021-02-12 09:29:24 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2021-02-12 11:04:46 +1000 |
commit | db0a2be1a023294000791fd0cb3d72f951045f02 (patch) | |
tree | bc4f38ed69309e782ad5757c65aae33cab8c66f6 | |
parent | 3eb428ef568808e4af115a64531a21fa28ed8dd2 (diff) |
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 <peter.hutterer@who-t.net>
-rw-r--r-- | test/test-tablet.c | 25 |
1 files 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(); |