Skip to content

Commit

Permalink
Fix event_device grab test
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems committed Feb 3, 2024
1 parent 720f434 commit 744416b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/liboxide/test_Event_Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ void test_Event_Device::test_create_device(){
void test_Event_Device::test_event_device(){
Oxide::event_device event0("/dev/input/event0", O_RDWR);
QCOMPARE(event0.device, "/dev/input/event0");
QVERIFY(!event0.locked);
event0.lock();
QVERIFY(event0.locked);
event0.unlock();
QVERIFY(!event0.locked);
QVERIFY(event0.fd > 0);
QVERIFY(!event0.locked);
if(event0.lock() != EBUSY){
QVERIFY(event0.locked);
event0.unlock();
QVERIFY(!event0.locked);
}
event0.close();
QCOMPARE(event0.fd, 0);
}
Expand Down

0 comments on commit 744416b

Please sign in to comment.