summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-04-29 10:03:21 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-04-30 13:21:02 +1000
commit6513c05f0c89fb2214fe9787b4d7049542a006cc (patch)
tree1da4a5fc859395fe4e23b12a5905125c6d8979a9
parent614623088b61cd1c95532adcabd46d0e98d7e1ff (diff)
server/grab: swap some EXPECT_EVENTS with ASSERT_EVENTS
We check some fields of those events which we can't do if we don't make sure we get them. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--tests/server/grab.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/server/grab.cpp b/tests/server/grab.cpp
index c7c79c0..a826837 100644
--- a/tests/server/grab.cpp
+++ b/tests/server/grab.cpp
@@ -1360,23 +1360,23 @@ TEST_F(TouchGrabTestOnLegacyClient, ActivePointerGrabOverPointerSelection)
TouchUpdate(202, 202);
TouchEnd();
- EXPECT_EVENT(XIDeviceEvent, press_dev_1, dpy, GenericEvent, xi2_opcode, XI_ButtonPress);
- EXPECT_EQ(press_dev_1->deviceid, deviceid);
-
- EXPECT_EVENT(XIDeviceEvent, motion, dpy, GenericEvent, xi2_opcode, XI_Motion);
- EXPECT_EQ(motion->deviceid, VIRTUAL_CORE_POINTER_ID);
- EXPECT_EVENT(XIDeviceEvent, press, dpy, GenericEvent, xi2_opcode, XI_ButtonPress);
- EXPECT_EQ(press->deviceid, VIRTUAL_CORE_POINTER_ID);
-
- EXPECT_EVENT(XIDeviceEvent, motion_dev_1, dpy, GenericEvent, xi2_opcode, XI_Motion);
- EXPECT_EQ(motion_dev_1->deviceid, deviceid);
- EXPECT_EVENT(XIDeviceEvent, release_dev_1, dpy, GenericEvent, xi2_opcode, XI_ButtonRelease);
- EXPECT_EQ(release_dev_1->deviceid, deviceid);
-
- EXPECT_EVENT(XIDeviceEvent, motion2, dpy, GenericEvent, xi2_opcode, XI_Motion);
- EXPECT_EQ(motion2->deviceid, VIRTUAL_CORE_POINTER_ID);
- EXPECT_EVENT(XIDeviceEvent, release, dpy, GenericEvent, xi2_opcode, XI_ButtonRelease);
- EXPECT_EQ(release->deviceid, VIRTUAL_CORE_POINTER_ID);
+ ASSERT_EVENT(XIDeviceEvent, press_dev_1, dpy, GenericEvent, xi2_opcode, XI_ButtonPress);
+ ASSERT_EQ(press_dev_1->deviceid, deviceid);
+
+ ASSERT_EVENT(XIDeviceEvent, motion, dpy, GenericEvent, xi2_opcode, XI_Motion);
+ ASSERT_EQ(motion->deviceid, VIRTUAL_CORE_POINTER_ID);
+ ASSERT_EVENT(XIDeviceEvent, press, dpy, GenericEvent, xi2_opcode, XI_ButtonPress);
+ ASSERT_EQ(press->deviceid, VIRTUAL_CORE_POINTER_ID);
+
+ ASSERT_EVENT(XIDeviceEvent, motion_dev_1, dpy, GenericEvent, xi2_opcode, XI_Motion);
+ ASSERT_EQ(motion_dev_1->deviceid, deviceid);
+ ASSERT_EVENT(XIDeviceEvent, release_dev_1, dpy, GenericEvent, xi2_opcode, XI_ButtonRelease);
+ ASSERT_EQ(release_dev_1->deviceid, deviceid);
+
+ ASSERT_EVENT(XIDeviceEvent, motion2, dpy, GenericEvent, xi2_opcode, XI_Motion);
+ ASSERT_EQ(motion2->deviceid, VIRTUAL_CORE_POINTER_ID);
+ ASSERT_EVENT(XIDeviceEvent, release, dpy, GenericEvent, xi2_opcode, XI_ButtonRelease);
+ ASSERT_EQ(release->deviceid, VIRTUAL_CORE_POINTER_ID);
ASSERT_TRUE(NoEventPending(dpy));
}