mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 19:50:25 +01:00
test: drop a now-obsolete test
As of d20bbfa5cb we handle the direct tool switch correctly so there's
no more warning. Which means testing for the warning is pointless.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
53200be4ae
commit
c6905dcd0b
1 changed files with 0 additions and 43 deletions
|
|
@ -2832,48 +2832,6 @@ START_TEST(tool_in_prox_before_start)
|
|||
}
|
||||
END_TEST
|
||||
|
||||
static void tool_switch_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, "Multiple tools active simultaneously"))
|
||||
(*warning_triggered)++;
|
||||
}
|
||||
|
||||
|
||||
START_TEST(tool_direct_switch_warning)
|
||||
{
|
||||
struct litest_device *dev = litest_current_device();
|
||||
struct libinput *li = dev->libinput;
|
||||
struct axis_replacement axes[] = {
|
||||
{ ABS_DISTANCE, 10 },
|
||||
{ ABS_PRESSURE, 0 },
|
||||
{ -1, -1 }
|
||||
};
|
||||
int warning_triggered = 0;
|
||||
|
||||
if (!libevdev_has_event_code(dev->evdev, EV_KEY, BTN_TOOL_RUBBER))
|
||||
return;
|
||||
|
||||
libinput_set_user_data(li, &warning_triggered);
|
||||
libinput_log_set_handler(li, tool_switch_warning);
|
||||
|
||||
litest_tablet_proximity_in(dev, 10, 10, axes);
|
||||
litest_drain_events(li);
|
||||
|
||||
litest_event(dev, EV_KEY, BTN_TOOL_RUBBER, 1);
|
||||
litest_event(dev, EV_SYN, SYN_REPORT, 0);
|
||||
libinput_dispatch(li);
|
||||
|
||||
ck_assert_int_eq(warning_triggered, 1);
|
||||
litest_restore_log_handler(li);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
START_TEST(tool_direct_switch_skip_tool_update)
|
||||
{
|
||||
struct litest_device *dev = litest_current_device();
|
||||
|
|
@ -5797,7 +5755,6 @@ TEST_COLLECTION(tablet)
|
|||
litest_add_no_device("tablet:tool", tool_capabilities);
|
||||
litest_add("tablet:tool", tool_type, LITEST_TABLET, LITEST_ANY);
|
||||
litest_add("tablet:tool", tool_in_prox_before_start, LITEST_TABLET, LITEST_TOTEM);
|
||||
litest_add("tablet:tool", tool_direct_switch_warning, LITEST_TABLET, LITEST_ANY);
|
||||
litest_add("tablet:tool", tool_direct_switch_skip_tool_update, LITEST_TABLET, LITEST_ANY);
|
||||
|
||||
/* Tablets hold back the proximity until the first event from the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue