>># 
>># 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: strnmdclr.m,v 1.9 92/06/11 16:19:31 rws Exp $
>># 
>>#      SCCS:  @(#)  EAcc3.mc Rel 1.5	    (10/2/91)
>>#      SCCS:  @(#)  ECol.mc Rel 1.4	    (7/31/91)
>>#      SCCS:  @(#)  ENam2.mc Rel 1.5	    (10/2/91)
>>#
>>TITLE XStoreNamedColor CH05
>>ASSERTION C XStoreNamedColor-1
If any of the visual classes DirectColor, PseudoColor or
GrayScale is supported: A call to XStoreNamedColor obtains
the closest available RGB values for the colormap argument
to those specified for the colour named color in the
database, and stores those values in the read-write
colourmap entry specified by the pixel component of the
XColor structure.
>>STRATEGY
For each visual class DirectColor, PseudoColor and GrayScale:
  Create a colormap with alloc set to AllocAll.
  Store the r,g and b colour values of XT_GOOD_COLOUR_NAME in the colourmap with XStoreNamedColor.
  Obtain the rbg values of the stored color with XQueryColor.
  Store those rgb values in the colormap with XStoreColor.
  Obtain the stored rgb values with XQueryColor.
  Verify the rgb values stored in the two cells are identical.
>>ASSERTION A XStoreNamedColor-2
If any of the visual classes DirectColor, PseudoColor or
GrayScale is supported: A call to XStoreNamedColor changes
the red, green and blue values in the read-write colourmap
entry in accordance with the flags argument.
>>STRATEGY
For each supported visual class DirectColor, PseudoColor and GrayScale:
  Create a colormap with XCreateColormap.
  Store XT_GOOD_COLOR_NAME r, g and b values in cell 0 with XStoreNamedColor.
  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 XT_GOOD_COLOR_NAME values in the colourmap cell using XStoreNamedColor.
    Verify that only the components of the colourcell specified by the flags value have been altered with XQueryColor.
>>ASSERTION A XStoreNamedColor-3
If any of the visual classes DirectColor, PseudoColor or
GrayScale is supported: Upper and lower case characters in
the color argument refer to the same color.
>>STRATEGY
For each supported visual class:
  Create a colomap with alloc set to AllocAll.
  Store colour XT_GOOD_COLOR_NAME in the colourmap with XStoreNamedColor.
  Obtain the stored rgb values with XQueryColor,
  Store colour XT_GOOD_COLOR_NAME  with alternating characters in alternating case with XStoreNamedColor.
  Verify that the rgb values written by both calls was identical.
>>ASSERTION A XStoreNamedColor-4
If any of the visual classes DirectColor, PseudoColor or
GrayScale is supported: When the pixel 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 colour XT_GOOD_COLOR_NAME at pixel = colourmap_size with XStoreNamedColor.
  Verify that a BadValue error is generated.
>>ASSERTION A XStoreNamedColor-5
When an attempt to store into a read-only or an unallocated
colormap entry is made, then a BadAccess error occurs.
>>STRATEGY
For each visual class DirectColor, PseudoColor and GrayScale:
  Create a colormap (r/o) with alloc set to AllocNone.
  Store the color XT_GOOD_COLORNAME with XStoreNamedColor
  Verify that a BadAccess error is generated.
  Create a new client with XOpenDisplay.
  Allocate a full red readonly cell for the new client with XAllocColor.
  Store the color XT_GOOD_COLORNAME with XStoreNamedColor.
  Verify that a BadAccess error occurred.
  Allocate another readonly cell with XAllocColor.
  Store the color XT_GOOD_COLORNAME with XStoreNamedColor.
  Verify that a BadAccess error occurred.
>>ASSERTION A XStoreNamedColor-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 A XStoreNamedColor-7
When the specified colour does not exist, then a BadName
error occurs.
>>STRATEGY
For the visual classes DirectColor, PseudoColor and GrayScale :
  Create a colormap with alloc set to AllocAll.
  Allocate a cell with colour XT_BAD_COLORNAME 
    in the colourmap with XStoreNamedColor.
  Verify that a BadName error occurred.
>>ASSERTION D XStoreNamedColor-8
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 XStoreNamedColor, then the pixel value is
decomposed into three components using the masks and the
independent colourmap entries are updated.
>>STRATEGY
Report UNTESTED
>>ASSERTION D XStoreNamedColor-9
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
XStoreNamedColor, 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
Report UNTESTED
