From 4ba56ac30995f85bc492b5154c40cb05e1053e57 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 27 Feb 2014 16:52:51 +1000 Subject: [PATCH] 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 --- test/test-libevdev-events.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test-libevdev-events.c b/test/test-libevdev-events.c index b9945b4..c9ceb33 100644 --- a/test/test-libevdev-events.c +++ b/test/test-libevdev-events.c @@ -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); -- 2.7.4