mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-24 00:50:42 +01:00
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>
This commit is contained in:
parent
3eb428ef56
commit
db0a2be1a0
1 changed files with 13 additions and 12 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue