>># 
>># 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: strclr.m,v 1.17 92/06/11 16:19:15 rws Exp $
>># 
>>#      SCCS:  @(#)  EAcc3.mc Rel 1.5	    (10/2/91)
>>#      SCCS:  @(#)  ECol.mc Rel 1.4	    (7/31/91)
>>#
>>TITLE XStoreColor CH05
>>ASSERTION C XStoreColor-1
If any of the visual classes DirectColor, PseudoColor or
Grayscale is supported: A call to XStoreColor obtains the
closest available RGB values for the colormap argument to
those specified in the red, green and blue components of
the XColor structure named by the color argument, and stores
those values in the read-write colourmap entry specified by
the pixel components of the XColor structure.
>>STRATEGY
For each visual class DirectColor, PseudoColor and GrayScale:
  Create a colormap with alloc set to AllocAll.
  Store the color r = 0xffff g = 0xf1f0 b = 0x0ff8 at cell 0.
  Obtain the rbg values of the stored color with XQueryColor.
  Store the returned rgb values in cell 0
  Obtain the stored values with XQueryColor.
  Verify the rgb values stored in both cases were identical.
>>ASSERTION C XStoreColor-2
If any of the visual classes DirectColor, PseudoColor or
GrayScale is supported: A call to XStoreColor changes the
red, green and blue values in the read-write colourmap entry
in accordance with the flags component of the XColor
structure named by the color argument.
>>STRATEGY
For each supported visual class DirectColor, PseudoColor and GrayScale:
  Create a colormap with XCreateColormap.
  Store the color r = 0xffff g = 0xf1f0 b = 0x0ff8 at cell 0 with XStoreColor.
  Obtain the r,g and b values with XQueryColor.
  For each possible combination DoRed, DoGreen and DoBlue in flags:
    Store the bitwise complementary rgb values in the same cell with XStoreColor.
    Store the color r = 0xffff g = 0xf1f0 b = 0x0ff8 at cell 0 with XStoreColor.
    Verify that only the components of the colourcell specified by the flags value have been altered with XQueryColor.

>>ASSERTION D XStoreColor-3
If any of the visual classes DirectColor, PseudoColor or
GrayScale is supported: When the colormap is an installed
colourmap for its screen, then any changes made by a call to
XStoreColor are visible immediately.
>>STRATEGY
Report UNTESTED
>>ASSERTION C XStoreColor-4
If any of the visual classes DirectColor, PseudoColor or
GrayScale is supported: When the pixel component in the
XColor structure named by the color argument is not a valid
entry in the colormap argument, then a BadValue error
occurs.
>>STRATEGY
For each visual class DirectColor, PseudoColor and GrayScale:
  Create a colourmap with alloc set to AllocAll.
  Store the color r = 0xffff g = 0xf1f0 b = 0x0ff8 using XStoreColor with pixel = colormap_size.
  Verify that a BadValue error is generated.
>>ASSERTION A XStoreColor-5
When an attempt to store into a read-only or an unallocated
colormap entry is made, then a BadAccess error occurs.
>>STRATEGY
For all visuals:
  Create a colormap with alloc set to AllocNone. (Unallocated for visual
	classes DirectColor, PseudoColor and GrayScale; R/O for visual
	classes TrueColor, StaticColor and StaticGray: all should
	provoke BadAccess)
  For each colormap cell:
    Store the color r = 0xffff g = 0xf1f0 b = 0x0ff8 using XStoreColor.
    Verify that a BadAccess error is generated.
  Create a new client with XOpenDisplay.
  Allocate a readonly cell for the new client with XAllocColor.
  Store a value in the cell with XStoreColor.
  Verify that a BadAccess error occurred.
  Allocate a readonly cell with XAllocColor.
  Store a value in the cell with XStoreColor.
  Verify that a BadAccess error occurred.
>>ASSERTION A XStoreColor-6
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 D XStoreColor-7
When rmask_return, gmask_return and bmask_return have been
returned by a previous call to XAllocColorPlanes and a
read-write colourmap entry for a pixel value is changed by a
call to XStoreColor, then the pixel value is decomposed
into three components using the masks and the independent
colourmap entries are updated.
>>STRATEGY
Report UNTESTED
>>ASSERTION C XStoreColor-8
If the visual class DirectColor is supported: When the
colormap argument was created with visual type DirectColor
and with alloc set to AllocAll, and a read-write colourmap
entry for a pixel value is changed by a call to XStoreColor,
then the pixel value is decomposed into three components
using the red_mask, green_mask and blue_mask in the visual
and the independent colourmap entries are updated.
>>STRATEGY
If visual class DirectColor is supported:
   Create a colourmap using makecolmap and AlocAll
   Allocate an array of XColor's and one for each of reds, greens & blues
   Set up each of reds, greens & blues to have a distinguishable value,
     using XStoreColor, and make sure that's what's in the equivalent colourmaps.
   Read back some suitably "random" triples and check their components
   Verify that each component is the same as the corresponding entry in
     reds, greens & blues.
   Free the allocated storage: colors, reds, greens & blues.
