>># 
>># 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: allcclrcll.m,v 1.4 92/06/11 17:44:41 rws Exp $
>># 
>>#
>>TITLE AllocColorCells XPROTO
>>ASSERTION C AllocColorCells-1
If the default visual class for screen zero is DirectColor,
PseudoColor, or GrayScale: When a client sends a valid
AllocColorCells protocol request to the X server, then the X
server sends back a reply to the client with the minimum
required length. Otherwise: When a client sends a valid
AllocColorCells protocol request to the X server, then the X
server sends back a BadAlloc error to the client.
>>STRATEGY
Call library function testfunc() to do the following:

If the default visual class for screen zero is
DirectColor, PseudoColor, or GrayScale :
Open a connection to the X server using native byte sex.
Create colourmap with alloc set to AllocNone.
Send a valid AllocColorCells protocol request to the X server.
Verify that the X server sends back a reply.
Open a connection to the X server using reversed byte sex.
Create colourmap with alloc set to AllocNone.
Send a valid AllocColorCells protocol request to the X server.
Verify that the X server sends back a reply.

Otherwise:
Open a connection to the X server using native byte sex.
Create colourmap with alloc set to AllocNone.
Send a valid AllocColorCells protocol request to the X server.
Verify that the X server sends back a BadAlloc error.
Open a connection to the X server using reversed byte sex.
Create colourmap with alloc set to AllocNone.
Send a valid AllocColorCells protocol request to the X server.
Verify that the X server sends back a BadAlloc error.
>>ASSERTION A AllocColorCells-2
When a client sends an invalid AllocColorCells protocol
request to the X server, in which the length field of the
request is not the minimum length required to contain the
request, then the X server sends back a BadLength error to
the client.
>>STRATEGY
Call library function testfunc() to do the following:
Open a connection to the X server using native byte sex.
Create colourmap with alloc set to AllocNone.
Send an invalid AllocColorCells protocol request to the X server with length 
  one less than the minimum length required to contain the request.
Verify that the X server sends back a BadLength error.
Open a connection to the X server using reversed byte sex.
Create colourmap with alloc set to AllocNone.
Send an invalid AllocColorCells protocol request to the X server with length 
  one less than the minimum length required to contain the request.
Verify that the X server sends back a BadLength error.

Open a connection to the X server using native byte sex.
Create colourmap with alloc set to AllocNone.
Send an invalid AllocColorCells protocol request to the X server with length 
  one greater than the minimum length required to contain the request.
Verify that the X server sends back a BadLength error.
Open a connection to the X server using reversed byte sex.
Create colourmap with alloc set to AllocNone.
Send an invalid AllocColorCells protocol request to the X server with length 
  one greater than the minimum length required to contain the request.
Verify that the X server sends back a BadLength error.
>>ASSERTION B AllocColorCells-3
When a client sends an invalid AllocColorCells protocol
request to the X server, in which the length field of the
request exceeds the maximum length accepted by the X server,
then the X server sends back a BadLength error to the
client.
>>STRATEGY
Call library function testfunc() to do the following:
Open a connection to the X server using native byte sex.
Create colourmap with alloc set to AllocNone.
Send an invalid AllocColorCells protocol request to the X server with length 
  one greater than the maximum length accepted by the server.
Verify that the X server sends back a BadLength error.
Open a connection to the X server using reversed byte sex.
Create colourmap with alloc set to AllocNone.
Send an invalid AllocColorCells protocol request to the X server with length 
  one greater than the maximum length accepted by the server.
Verify that the X server sends back a BadLength error.
