test: add two more checks for the current slot

When syncing, we expect the slot to stay the same until the client has
processed the events. This already worked, just add a check to make sure.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2014-02-27 16:52:51 +10:00
parent f3f31b47fc
commit 4ba56ac309

View file

@ -518,6 +518,7 @@ START_TEST(test_syn_delta_mt)
rc = libevdev_next_event(dev, LIBEVDEV_READ_FLAG_FORCE_SYNC, &ev);
ck_assert_int_eq(rc, LIBEVDEV_READ_STATUS_SYNC);
ck_assert_int_eq(libevdev_get_current_slot(dev), 0);
rc = libevdev_next_event(dev, LIBEVDEV_READ_FLAG_SYNC, &ev);
ck_assert_int_eq(rc, LIBEVDEV_READ_STATUS_SYNC);
ck_assert_int_eq(ev.type, EV_ABS);
@ -553,6 +554,8 @@ START_TEST(test_syn_delta_mt)
ck_assert_int_eq(ev.type, EV_ABS);
ck_assert_int_eq(ev.code, ABS_MT_SLOT);
ck_assert_int_eq(ev.value, 1);
ck_assert_int_eq(libevdev_get_current_slot(dev), 1);
rc = libevdev_next_event(dev, LIBEVDEV_READ_FLAG_SYNC, &ev);
ck_assert_int_eq(rc, LIBEVDEV_READ_STATUS_SYNC);
ck_assert_int_eq(ev.type, EV_ABS);