[autotest/libinput] Verify that Event::create can handle a null argument
This commit is contained in:
parent
1e564989c9
commit
4548ba403b
1 changed files with 3 additions and 0 deletions
|
@ -76,6 +76,9 @@ void TestLibinputKeyEvent::testCreate()
|
||||||
// verify it's a key event
|
// verify it's a key event
|
||||||
QVERIFY(dynamic_cast<KeyEvent*>(event.data()));
|
QVERIFY(dynamic_cast<KeyEvent*>(event.data()));
|
||||||
QCOMPARE((libinput_event_keyboard*)(*dynamic_cast<KeyEvent*>(event.data())), keyEvent);
|
QCOMPARE((libinput_event_keyboard*)(*dynamic_cast<KeyEvent*>(event.data())), keyEvent);
|
||||||
|
|
||||||
|
// verify that a nullptr passed to Event::create returns a nullptr
|
||||||
|
QVERIFY(!Event::create(nullptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestLibinputKeyEvent::testEvent_data()
|
void TestLibinputKeyEvent::testEvent_data()
|
||||||
|
|
Loading…
Reference in a new issue