>># 
>># 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: stdshs.m,v 1.7 92/06/11 16:18:04 rws Exp $
>># 
>>#      SCCS:  @(#)  EAll.mc Rel 1.5	    (3/12/92)
>>#      SCCS:  @(#)  EGC.mc Rel 1.5	    (10/25/91)
>>#
>>TITLE XSetDashes CH05
>>ASSERTION A XSetDashes-1
A call to XSetDashes sets the dash_offset and dash_list
attributes for dashed line styles in the specified GC to the
values of the dash_offset and dash_list arguments.
>>STRATEGY
Create Window.
Create GC with dashes component = 1 , LineStyle = LineDoubleDash, fg = WhitePixel, bg = BlackPixel.
Set pixel at (1, 0) with XDrawPoint.
Draw line from (0, 0) to (2, 0) with XDrawLines.
Verify pixel at (1, 0) is bg using XGetImage and XGetpixel.
Set dashes component of GC to [2, 1] with XSetDashes.
Draw line from (0, 0) to (2, 0) using XDrawLine.
Verify pixel at (1, 0) is fg using XGetImage and XGetPixel.
>>ASSERTION A XSetDashes-2
The initial and alternate elements of the dash_list
argument specify the lengths of the even dashes and the
second and alternate elements specify the lengths of the odd
dashes.
>>STRATEGY
For zero width and non-zero width lines:
    Create GC with line_style = LineDoubleDashed.
    Set dashes component of GC to [2, 1] with XSetDashes.
    Draw horizontal line from (0, 0) to (4, 0) using XDrawLine.
    Verify pixels at (0, 0) and (1, 0) are fg using XGetImage and XGetPixel.
    Verify pixel at (2, 0) is bg using XGetImage and XGetPixel.
    Verify pixel at (3, 0) is fg using XGetImage and XGetPixel.
    Draw vertical line from (0, 1) to (0, 5) using XDrawLine.
    Verify pixels at (0, 1) and (0, 2) are fg using XGetImage and XGetPixel.
    Verify pixel at (0, 3) is bg using XGetImage and XGetPixel.
    Verify pixel at (0, 4) is fg using XGetImage and XGetPixel.
>>ASSERTION A XSetDashes-3
When an odd-length list is specified, then it is
concatenated with itself to produce an even-length list.
>>STRATEGY
Create GC with line_style = LineDoubleDashed.
Set dashes component of GC to [1, 3, 2] with XSetDashes.
Draw horizontal line from (0, 0) to (10, 0) using XDrawLine.
Set dashes component of GC to [1, 3, 2, 1, 3, 2] with XSetDashes.
Draw horizontal line from (0, 1) to (10, 1) using XDrawLine.
Verify that the two lines are identical using XGetImage and XGetPixel.
>>ASSERTION B XSetDashes-4
When the server fails to allocate a required resource, then
a BadAlloc error occurs.
>>STRATEGY
Report UNTESTED
>>ASSERTION A XSetDashes-5
When the GC argument does not name a defined GC, then a
BadGC error occurs.
>>STRATEGY
Create a GC.
Set GC id to -1 using XTestSetGContextOfGC.
Call test function using bad GC as the GC argument.
Verify that a BadGC error occurs.
>>ASSERTION A XSetDashes-6
When the specified dash list is empty, then a BadValue
error occurs.
>>STRATEGY
Call XSetDashes with dash_list set to NULL and n set to 0.
Verify that a BadValue error occurs.
>>ASSERTION A XSetDashes-7
When an element of the dash list is 0, then a BadValue
error occurs.
>>STRATEGY
Set dashes component of GC to [1, 0, 1] with XSetDashes.
Verify that a BadValue error occurs.
