From c6905dcd0bcfda3e20e8d1b2e078c7c18bdc0ac0 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 5 Nov 2019 00:12:08 +0000 Subject: [PATCH] test: drop a now-obsolete test As of d20bbfa5cb56e8bc 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 --- test/test-tablet.c | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/test/test-tablet.c b/test/test-tablet.c index 41452eee..340615c4 100644 --- a/test/test-tablet.c +++ b/test/test-tablet.c @@ -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