>># 
>># Copyright 1990, 1991 by the Massachusetts Institute of Technology and
>># UniSoft Group Limited.
>># 
>># Permission to use, copy, modify, distribute, and sell this software and
>># its documentation for any purpose is hereby granted without fee,
>># provided that the above copyright notice appear in all copies and that
>># both that copyright notice and this permission notice appear in
>># supporting documentation, and that the names of MIT and UniSoft not be
>># used in advertising or publicity pertaining to distribution of the
>># software without specific, written prior permission.  MIT and UniSoft
>># make no representations about the suitability of this software for any
>># purpose.  It is provided "as is" without express or implied warranty.
>># 
>># $XConsortium: chcktypdwd.m,v 1.8 92/06/11 17:18:54 rws Exp $
>># 
>>#
>>TITLE XCheckTypedWindowEvent CH08
>>ASSERTION A XCheckTypedWindowEvent-1
A call to XCheckTypedWindowEvent returns in event_return
the first event in the event queue that matches event_type
and window w.
>>STRATEGY
Create a window.
Discard all events on the event queue.
Call XPutBackEvent to put events on the event queue.
Call XCheckTypedWindowEvent.
Verify that XCheckTypedWindowEvent returned True.
Verify the correct event-type was returned.
Verify the event contained correct window.
Verify the first matching event in event queue was returned.
>>ASSERTION - XCheckTypedWindowEvent-2
When a call to XCheckTypedWindowEvent finds a matching
event, then XCheckTypedWindowEvent returns True.
>>ASSERTION A XCheckTypedWindowEvent-3
A call to XCheckTypedWindowEvent removes the returned event
from the event queue.
>>STRATEGY
Create a window.
Discard all events on the event queue.
Call XPutBackEvent to put events on the event queue.
Call XPending to get the current event queue size.
Call XCheckTypedWindowEvent.
Verify that XCheckTypedWindowEvent returned True.
Call XPending to get the current event queue size.
Verify that size of event queue has decreased by one.
>>ASSERTION - XCheckTypedWindowEvent-4
When the event queue does not contain a matching event,
then a call to XCheckTypedWindowEvent returns in
event_return the first matching event available on the X
server connection.
>>ASSERTION A XCheckTypedWindowEvent-5
When a matching event is not in the event queue and is not
available on the X server connection, then a call to
XCheckTypedWindowEvent returns False.
>>STRATEGY
Create a window.
Discard all events on the event queue.
Call XCheckTypedWindowEvent.
Verify that XCheckTypedWindowEvent returned False.
>>ASSERTION A XCheckTypedWindowEvent-6
When a matching event is not in the event queue and is not
available on the X server connection, then a call to
XCheckTypedWindowEvent flushes the output buffer.
>>STRATEGY
Create client2.
Discard all events on the event queue.
Create pixmap.
Create a window.
Call XCheckTypedWindowEvent.
Verify that XCheckTypedWindowEvent returned False.
Empty the buffer.
Ensure the server has dealt with anything flushed to it: do XSync()
Verify that the output buffer was flushed by effect on server.
