>># 
>># 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: allcclr.m,v 1.7 92/06/11 16:14:27 rws Exp $
>># 
>>#      SCCS:  @(#)  ECol.mc Rel 1.4	    (7/31/91)
>>#      SCCS:  @(#)  EAll.mc Rel 1.5	    (3/12/92)
>>#
>>TITLE XAllocColor CH05
>>ASSERTION A XAllocColor-1
A call to XAllocColor allocates a read-only entry in the
colormap argument corresponding to the closest RGB value
that is supported by the hardware to the value specified by
the red, green, and blue components in the XColor
structure named by the screen_in_out argument, returns that
value in the red, green, and blue components in the XColor
structure named by the screen_in_out argument and returns
the colourmap entry in the pixel component in the XColor
structure named by the screen_in_out argument.
>>STRATEGY
For each supported visual class:
  Create a colormap with XCreateColormap.
  Create a new client with XOpenDisplay.
  Allocate one read-only colorcell with XAllocColor with the second client.
  Reallocate a cell with the returned RGB values with the original client.
  Verify that the returned pixel is identical to the first and that the r, g and b value argee.
  Verify  the cell is read only with the failure of XStoreColor.
>>ASSERTION A XAllocColor-2
A call to XAllocColor does not use or affect the flags
component of the XColor structure named by the screen_in_out
argument.
>>STRATEGY
For each supported visual class:
  Create a colormap with XCreateColormap.
  Allocate a colourcell with an XColor structure flags component of DoGreen,
   and red, green and blue components of 255<<8, 63<<8 and 31 <<8.
  Verify that the returned flags component is DoGreen.
  Allocate a colourcell with an XColor structure flags component of DoRed | DoBlue
   and red, green and blue components of 255<<8, 63<<8 and 31 <<8.
  Verify that the returned flags component is DoRed | DoBlue.
  Verify that the returned pixel and red, green and blue values are identical to
   those initially returned.
>>ASSERTION A XAllocColor-3
When a call to XAllocColor has allocated a read-only entry
in a colourmap, then a subsequent call to XAllocColor with
identical red, green and blue components in the XColor
structure named by the screen_in_out argument returns an
identical pixel component in the XColor structure.
>>STRATEGY
For each supported visual class:
  Create a colormap with XCreateColormap.
  Allocate a colourcell with an XColor structure with
   red, green and blue components of 255<<8, 127<<8 and 63 <<8.
  Allocate a colourcell with an XColor structure having the
   the previously returned rgb values.
  Verify that the returned pixel is the same as that initially returned.
>>ASSERTION A XAllocColor-4
When a colourmap argument does not name a valid colourmap,
then a BadColor error occurs.
>>STRATEGY
Create a bad colourmap by creating and freeing a colourmap.
Call test function using bad colourmap as the colourmap argument.
Verify that a BadColor error occurs.
>>ASSERTION B XAllocColor-5
When the server fails to allocate a required resource, then
a BadAlloc error occurs.
>>STRATEGY
Report UNTESTED
