>># 
>># 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: allcclrpln.m,v 1.7 92/06/11 16:14:43 rws Exp $
>># 
>>#      SCCS:  @(#)  ECol.mc Rel 1.4	    (7/31/91)
>>#      SCCS:  @(#)  EVal.mc Rel 1.5	    (10/10/91)
>>#
>>TITLE XAllocColorPlanes CH05
>>ASSERTION A XAllocColorPlanes-1
A call to XAllocColorPlanes allocates
ncolors*2pow(nreds+ngreens+nblues) read/write colourmap
entries whose indices in the colourmap are obtained by ORing
each pixel value returned in the pixels_return argument with
zero or more of the planes obtained by ORing the masks
returned in the rmask_return, gmask_return and bmask_return
arguments.
>>STRATEGY
For visual class DirectColor:
  Create a colormap with alloc set to AllocNone.
  Allocate one colour and all planes with XAllocColorPlanes.
  Verify that the function did not return zero.
  Verify the correct number of cells have been allocated by initialising
    them with XStoreColors, and reading them with XQueryColors.
>>ASSERTION A XAllocColorPlanes-2
A call to XAllocColorPlanes sets nreds bits to one in the
mask named by rmask_return, ngreens bits to one in the mask
named by gmask_return, and nblues bits to one in the mask
named by bmask_return and returns ncolors pixels values in
the pixels_return argument such that no mask has a bit set
in common with any other mask or with any of the pixels.
>>STRATEGY
For the visual class DirectColor:
  Create a colormap with alloc set to AllocNone.
  Allocate one colour and all planes with XAllocColorPlanes.
  Verify the bitcount of the OR of the colourplane masks equals the 
    sum of the individual bitcounts.
  Verify that the AND of the pixel and the OR of the colourplane masks is zero.
  Create a colormap with alloc set to AllocNone.
  Allocate 3 colours and 3 planes with XAllocColorPlanes.
  Verify the bitcount of the OR of the colourplane masks equals the 
    sum of the individual bitcounts.
  Verify that the AND of each pixel and the OR of the colourplane masks is zero.
>>ASSERTION A XAllocColorPlanes-3
If the visual class DirectColor is supported: When the
visual type of the colormap argument is DirectColor, then
rmask_return lies within the red pixel subfield and the
gmask_return lies within the green pixel subfield and the
bmask_return lies within the blue pixel subfield.
>>STRATEGY
For the visual class DirectColor:
  Create a colormap with alloc set to AllocNone.
  Allocate one colour and all planes with XAllocColorPlanes.
  Verify that the returned masks and the colour subfield masks are identical.
>>ASSERTION A XAllocColorPlanes-4
When the contig argument is True, then rmask_return,
gmask_return and bmask_return each contains a contiguous set
of bits set to one.
>>STRATEGY
For the visual class DirectColor:
  Create a colormap with alloc set to AllocNone.
  Allocate one colour and some planes with XAllocColorPlanes and contig = True.
  Verify that the returned masks were contiguous.
>>ASSERTION A XAllocColorPlanes-5
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 XAllocColorPlanes-6
When the ncolors argument is zero, then a BadValue error
occurs.
>>STRATEGY
For all supported visual classes:
  Create a colormap with alloc set to AllocNone.
  Call XAllocColorPlanes with ncolors = 0.
>>ASSERTION A XAllocColorPlanes-7
When the value of contig is other than True or False, then
a BadValue error occurs.
>>STRATEGY
Obtain a sequence of values which are not in the list specified by VALUE_LIST.
For each value:
  Call test function with this value in the VALUE_ARG argument.
  Verify that a BadValue error occurs.
