test/xi2: Verify that XI_GestureSwipeEnd is ignored when outside mask

This commit is contained in:
Povilas Kanapickas 2021-05-30 13:26:36 +03:00
parent 407a2234b3
commit f3462178ca
1 changed files with 12 additions and 1 deletions

View File

@ -233,6 +233,17 @@ request_XISelectEvents_masks(xXISelectEventsReq * req)
}
/* Test 5:
* Mask len is 1 and XI_GestureSwipeEnd is set outside the mask.
* That bit should be ignored -> Success
*/
bits = (unsigned char *) &mask[1];
mask->mask_len = 1;
memset(bits, 0, 5);
SetBit(bits, XI_ButtonPress); // does not matter which one
SetBit(bits, XI_GestureSwipeEnd);
request_XISelectEvent(req, Success);
/* Test 6:
* HierarchyChanged bit is BadValue for devices other than
* XIAllDevices
*/
@ -247,7 +258,7 @@ request_XISelectEvents_masks(xXISelectEventsReq * req)
request_XISelectEvent(req, BadValue);
}
/* Test 6:
/* Test 7:
* All bits set minus hierarchy changed bit -> Success
*/
bits = (unsigned char *) &mask[1];