>># 
>># 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: stwmprprts.m,v 1.17 92/06/11 17:31:47 rws Exp $
>># 
>>#      SCCS:  @(#)  EAll.mc Rel 1.5	    (3/12/92)
>>#      SCCS:  @(#)  EWin.mc Rel 1.4	    (7/19/91)
>>#
>>TITLE XSetWMProperties CH09
>>ASSERTION A XSetWMProperties-1
When the window_name argument is non-NULL, then a call to
XSetWMProperties sets the WM_NAME property for the window w
to be of data, type, format and number of items as specified
by the value field, the encoding field, the format field,
and the nitems field of the XTextProperty structure named by
the window_name argument.
>>STRATEGY
Create a window with XCreateWindow.
Set the WM_NAME property with XSetWMProperties.
Obtain the WM_NAME property using XGetTextProperty.
Verify that the format, encoding and value are correct.
>>ASSERTION A XSetWMProperties-2
When the icon_name argument is non-NULL, then a call to
XSetWMProperties sets the WM_ICON_NAME property for the
window w to be of data, type, format and number of items as
specified by the value field, the encoding field, the format
field, and the nitems field of the XTextProperty structure
named by the icon_name argument.
>>STRATEGY
Create a window with XCreateWindow.
Set the WM_ICON_NAME property with XSetWMProperties.
Obtain the WM_ICON_NAME property using XGetTextProperty.
Verify that the property format was correct.
Verify that the property type was correct.
Verify that the propery value was correct.
Free allocated property with XFree.
>>ASSERTION A XSetWMProperties-3
When the argv argument is non-NULL, then a call to
XSetWMProperties sets the WM_COMMAND property for the window
w to the argv argument.
>>STRATEGY
Create a window using XCreateWindow.
Set the WM_COMMAND property using XSetWMProperties.
Obtain the value of the WM_COMMAND property using XGetTextProperty.
Verify that the number and value of the returned strings is correct.
Release the allocated memory using XFreeStringList.
>>ASSERTION A XSetWMProperties-4
When the normal_hints argument is non-NULL, then a call to
XSetWMProperties sets the WM_NORMAL_HINTS property for the
window w to be of type WM_SIZE_HINTS, format 32 and to have
value set to the normal_hints argument.
>>STRATEGY
Create a window with XCreateWindow.
Set the WM_NORMAL_HINTS property with XSetWMProperties.
Obtain the value, type and format of the WM_NORMAL_HINTS property using XGetWindowProperty.
Verify that the type is WM_SIZE_HINTS.
Verify that the format is 32.
Verify that the value is identical to that value set by XSetWMNormalHints.
>>ASSERTION A XSetWMProperties-5
When the wm_hints argument is non-NULL, then a call to
XSetWMProperties sets the WM_HINTS property for the window w
to be of type WM_HINTS, format 32 and to have value set to
the wm_hints argument.
>>STRATEGY
Create a window with XCreateWindow.
Set the WM_HINTS property for the window with XSetWMProperties.
Verify type and format are XA_WM_HINTS and 32, respectively.
Verify that the property value was correctly set with XGetWindowProperty.
>>ASSERTION A XSetWMProperties-6
When the class_hints argument is non-NULL, then a call to
XSetWMProperties sets the WM_CLASS property for the window w
to the class_hints argument.
>>STRATEGY
Create a window with XCreateWindow.
Set the WM_CLASS property for the window using XSetWMProperites.
Obtain the value type and format  of the WM_CLASS property using XGetWindowProperty.
Verify that the format is 8.
Verify that the type is STRING.
Verify that the value is correct.
>>ASSERTION A XSetWMProperties-7
When the res_name component of the XClassHint structure
named by the class_hints argument is NULL and the
RESOURCE_NAME environment variable is set, then a call to
XSetWMProperties sets the WM_CLASS property for the window w
after substituting the value of the RESOURCE_NAME
environment variable for the NULL res_name component.
>>STRATEGY
Fork a child process using tet_fork.
Execute the File "./Test1" using tet_exec with envp set to "RESOUCE_NAME=XTest_res_name"
In child:
  Verify the environment variable RESOURCE_NAME is defined in the environment using getenv.
  Set the WM_CLASS property using XSetWMProperties with the class_hints structure having NULL as the res_name component.
  Obtain the value of the WM_CLASS property using XGetClassHint.
  Verify that the value is "XTest_res_name".
>>ASSERTION G XSetWMProperties-8
When the res_name component of the XClassHint structure
named by the class_hints argument is NULL and the
RESOURCE_NAME environment variable is not set and argv and
argv[0] are non-NULL, then a call to XSetWMProperties sets
the WM_CLASS property for the window w after substituting
argv[0], stripped of any directory prefixes, for the NULL
res_name component.
>>STRATEGY
Fork a child process using tet_fork.
Execute the File "./Test2" using tet_exec with environ without RESOURCE_NAME.
In child:
  Verify the environment variable RESOURCE_NAME is not defined in the environment using getenv..
  Set the WM_CLASS property using XSetWMProperties with the class_hints structure having NULL as the res_name component.
  Obtain the value of the WM_CLASS property using XGetClassHint.
  Verify that the value is "Test2".
>>ASSERTION B XSetWMProperties-9
When the server fails to allocate a required resource, then
a BadAlloc error occurs.
>>STRATEGY
Report UNTESTED
>>ASSERTION A XSetWMProperties-10
When a window argument does not name a valid Window, then a
BadWindow error occurs.
>>STRATEGY
Create a bad window by creating and destroying a window.
Call test function using bad window as the window argument.
Verify that a BadWindow error occurs.
