>># 
>># 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: crtglyphcr.m,v 1.15 92/06/11 16:22:06 rws Exp $
>># 
>>#      SCCS:  @(#)  EAll.mc Rel 1.5	    (3/12/92)
>>#      SCCS:  @(#)  EFon1.mc Rel 1.5	    (9/20/91)
>>#
>>TITLE XCreateGlyphCursor CH06
>>ASSERTION B XCreateGlyphCursor-1
A call to XCreateGlyphCursor creates a Cursor with colours
defined by foreground_color and background_color and returns
its ID.
>>STRATEGY
Load xtfont0 using XLoadFont.
Call XCreateGlyphCursor with foreground colour W_FG and
background colour W_BG.
Verify that XCreateGlyphCursor returns non-zero.
>>ASSERTION B XCreateGlyphCursor-2
The source_char specifies the glyph in the source_font from
which the source bitmap is obtained.
>>STRATEGY
Load xtfont0 using XLoadFont.
Call XCreateGlyphCursor with source_char set to
a known defined glyph in font xtfont0.
Verify that XCreateGlyphCursor returns non-zero.
>>ASSERTION B XCreateGlyphCursor-3
The mask_char specifies the glyph in the mask_font from
which the mask bitmap is obtained.
>>STRATEGY
Load xtfont0 using XLoadFont.
Load xtfont1 using XLoadFont.
Call XCreateGlyphCursor with mask_char set to
a known defined glyph in font xtfont1.
Verify that XCreateGlyphCursor returns non-zero.
>>ASSERTION B XCreateGlyphCursor-4
When mask_char is zero, then all pixels of the source are
displayed.
>>STRATEGY
Load xtfont0 using XLoadFont.
Load xtfont1 using XLoadFont.
Call XCreateGlyphCursor with mask_char set to zero.
Verify that XCreateGlyphCursor returns non-zero.
>>ASSERTION B XCreateGlyphCursor-5
When mask_char and mask_font are non-zero and a given bit
in the mask bitmap is 1, then the corresponding pixel of the
source is displayed.
>>STRATEGY
Load xtfont0 using XLoadFont.
Load xtfont1 using XLoadFont.
Call XCreateGlyphCursor with mask_font set to non-zero and
mask_char corresponding to a glyph in mask_font which
has at least one bit set to non-zero.
Verify that XCreateGlyphCursor returns non-zero.
>>ASSERTION B XCreateGlyphCursor-6
When mask_char and mask_font are non-zero and a given bit
in the mask bitmap is 0, then the corresponding pixel of the
source is not displayed.
>>STRATEGY
Load xtfont0 using XLoadFont.
Load xtfont1 using XLoadFont.
Call XCreateGlyphCursor with mask_font set to non-zero and
mask_char corresponding to a glyph in mask_font which
has at least one bit set to zero.
Verify that XCreateGlyphCursor returns non-zero.
>>ASSERTION B XCreateGlyphCursor-7
When a bit in the source bitmap is 1, then foreground_color
is used.
>>STRATEGY
Load xtfont0 using XLoadFont.
Load xtfont1 using XLoadFont.
Call XCreateGlyphCursor with glyph with at least
one bit in the source bitmap set to 1.
Verify that XCreateGlyphCursor returns non-zero.
>>ASSERTION B XCreateGlyphCursor-8
When a bit in the source bitmap is 0, then background_color
is used.
>>STRATEGY
Load xtfont0 using XLoadFont.
Load xtfont1 using XLoadFont.
Call XCreateGlyphCursor with source char corresponding to glyph which
has at least one bit set to zero.
Verify that XCreateGlyphCursor returns non-zero.
>>ASSERTION B XCreateGlyphCursor-9
When mask_char is non-zero, then its glyph origin is
positioned coincidently with that of source_char.
>>STRATEGY
Load xtfont0 using XLoadFont.
Load xtfont1 using XLoadFont.
Call XCreateGlyphCursor with non-zero mask_char.
Verify that XCreateGlyphCursor returns non-zero.
>>ASSERTION B XCreateGlyphCursor-10
The origin of the source_char defines the hotspot.
>>STRATEGY
Report UNTESTED
>>ASSERTION B XCreateGlyphCursor-11
The source_char and mask_char need not have the same
bounding box metrics.
>>STRATEGY
Load xtfont0 using XLoadFont.
Call XCreateGlyphCursor with source_char and mask_char
with different bounding boxes.
Verify that XCreateGlyphCursor returns non-zero.
>>ASSERTION B XCreateGlyphCursor-12
When a cursor is created by a call to XCreateGlyphCursor,
and the source_font or mask_font argument is freed be a
subsequent call to XFreeFont, then the cursor is
unaffected.
>>STRATEGY
Load xtfont0 using XLoadQueryFont.
Verify that XLoadQueryFont returns non-zero.
Load xtfont1 using XLoadQueryFont.
Verify that XLoadQueryFont returns non-zero.
Call XCreateGlyphCursor with foreground colour W_FG and background colour W_BG.
Verify that XCreateGlyphCursor returns non-zero.
Call XFreeFont for xtfont0.
Call XFreeFont for xtfont1.
>>ASSERTION B XCreateGlyphCursor-13
For 2-byte matrix fonts, the 16-bit value should be formed
with the byte1 member in the most significant byte and the
byte2 member in the least significant byte.
>>STRATEGY
Load 2-byte matrix font xtfont6 using XLoadFont.
Call XCreateGlyphCursor with foreground colour W_FG and
background colour W_BG.
Verify that XCreateGlyphCursor returns non-zero.
>>ASSERTION B XCreateGlyphCursor-14
When the server fails to allocate a required resource, then
a BadAlloc error occurs.
>>STRATEGY
Report UNTESTED
>>ASSERTION A XCreateGlyphCursor-15
When the source_char argument is not a defined glyph in
source_font, then a BadValue error occurs.
>>STRATEGY
Load xtfont0 using XLoadFont.
Call XCreateGlyphCursor with a source_char which is
an undefined glyph in source_font.
Verify that a BadValue error occurs.
>>ASSERTION A XCreateGlyphCursor-16
When mask_font is non-zero and mask_char is non-zero and
not a defined glyph in mask_font, then a BadValue error
occurs.
>>STRATEGY
Load xtfont0 using XLoadFont.
Call XCreateGlyphCursor with a mask_char which is
an undefined glyph in mask_font.
Verify that a BadValue error occurs.
>>ASSERTION A XCreateGlyphCursor-17
When a font argument does not name a valid font, then a
BadFont error occurs.
>>STRATEGY
Create a bad font by loading and freeing a font.
Call test function using bad font as the font argument.
Verify that a BadFont error occurs.
