[PATCH] test: fix grab mode value tests for new XIGrabModeTouch
Peter Hutterer
peter.hutterer at who-t.net
Wed Dec 21 16:02:07 PST 2011
This test checks that last-valid-mode + 1 returns a BadValue. With the
addition of XIGrabModeTouch, that value has changed - sync it up again.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
Whoops, this one only triggered in one of the very late rebases
test/input.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/test/input.c b/test/input.c
index d27b3f0..576cd85 100644
--- a/test/input.c
+++ b/test/input.c
@@ -161,22 +161,31 @@ static void dix_check_grab_values(void)
rc = CheckGrabValues(&client, ¶m);
assert(rc == Success);
- param.this_device_mode = GrabModeAsync + 1;
+ param.this_device_mode = XIGrabModeTouch;
+ rc = CheckGrabValues(&client, ¶m);
+ assert(rc == Success);
+
+ param.this_device_mode = XIGrabModeTouch + 1;
rc = CheckGrabValues(&client, ¶m);
assert(rc == BadValue);
assert(client.errorValue == param.this_device_mode);
- assert(client.errorValue == GrabModeAsync + 1);
+ assert(client.errorValue == XIGrabModeTouch + 1);
param.this_device_mode = GrabModeSync;
param.other_devices_mode = GrabModeAsync;
rc = CheckGrabValues(&client, ¶m);
+
+ param.this_device_mode = GrabModeSync;
+ param.other_devices_mode = XIGrabModeTouch;
+ rc = CheckGrabValues(&client, ¶m);
+ assert(rc == Success);
assert(rc == Success);
- param.other_devices_mode = GrabModeAsync + 1;
+ param.other_devices_mode = XIGrabModeTouch + 1;
rc = CheckGrabValues(&client, ¶m);
assert(rc == BadValue);
assert(client.errorValue == param.other_devices_mode);
- assert(client.errorValue == GrabModeAsync + 1);
+ assert(client.errorValue == XIGrabModeTouch + 1);
param.other_devices_mode = GrabModeSync;
--
1.7.7.4
More information about the xorg-devel
mailing list