autotests: Drop TestLibinputTouchEvent::testNoAssignedSlot()

We've switched to libinput_event_get_seat_slot(), which returns a
non-negative number to indicate the slot.
This commit is contained in:
Vlad Zahorodnii 2021-02-16 12:52:08 +02:00
parent 242544a056
commit 2df429ce5e

View file

@ -30,7 +30,6 @@ private Q_SLOTS:
void testType();
void testAbsoluteMotion_data();
void testAbsoluteMotion();
void testNoAssignedSlot();
private:
libinput_device *m_nativeDevice = nullptr;
@ -117,19 +116,5 @@ void TestLibinputTouchEvent::testAbsoluteMotion()
QCOMPARE(te->absolutePos(QSize(1280, 1024)), QPointF(640, 512));
}
void TestLibinputTouchEvent::testNoAssignedSlot()
{
// this test verifies that touch events without an assigned slot get id == 0
libinput_event_touch *touchEvent = new libinput_event_touch;
touchEvent->type = LIBINPUT_EVENT_TOUCH_UP;
touchEvent->device = m_nativeDevice;
// touch events without an assigned slot have slot == -1
touchEvent->slot = -1;
QScopedPointer<Event> event(Event::create(touchEvent));
QVERIFY(dynamic_cast<TouchEvent*>(event.data()));
QCOMPARE(dynamic_cast<TouchEvent*>(event.data())->id(), 0);
}
QTEST_GUILESS_MAIN(TestLibinputTouchEvent)
#include "touch_event_test.moc"