Design: 09.01.04.02/P02
This is an abstract, language-independent design. Grim
details may be found in the
corresponding source code.
You may return to the
documentation
for the module containing this program design, or to the
entire hierarchical table of
topics covered by the PVT.
PROGRAM 2: Error 151 handled by system
CHARACTERISTICS: ynny
OPERATOR SCRIPT:
See OPERATOR SCRIPT for Program 1.
DESIGN:
Throughout this program, every time an error is signalled (as noted
by the tag "signals error"), the system-defined error handler should
call <error logging> to write in error message on the error file.
Given invalid window limits to test if functions 86,87 generate error 151:
ignoring function, invalid window: XMIN>=XMAX, YMIN>=YMAX, ZMIN>ZMAX,
UMIN>=UMAX, or VMIN>=VMAX.
*** *** *** Generate errors; test absence of side effects *** *** ***
<open workstation> wkid
<set workstation window 3> with xmin=0.1, xmax=0.9, ymin=0.1, ymax=0.9,
zmin=0.1, zmax=0.9
<set workstation window 3> with xmin=0.6, xmax=0.3, ymin=0., ymax=1.,
zmin=0.1, zmax=0.9: signals error
Use <inquire workstation transformation 3> to get:
workstatioin window limit: xmin1,xmax1,ymin1,ymax1,zmin1,zmax1
<set workstation window 3> with xmin=0., xmax=1., ymin=0.6, ymax=0.6,
zmin=0.,zmax=1.: signals error
<set workstation window 3> with xmin=0., xmax=1., ymin=0., ymax=1.,
zmin=0.6,zmax=0.3: signals error
<set workstation windoe 3> with xmin=0., xmax=1., ymin=0.6, ymax=0.3,
zmin=0.,zmax=0. : signals error
<set workstation window> with xmin=0.6, xmax=0.3, ymin=0., ymax=1.:
signals error
<set workstation window> with xmin=0., xmax=1., ymin=0.6, ymax=0.3:
signals error
Use <inquire workstation transformation 3> to get:
workstation window limit: xmin1,xmax1,ymin1,ymax1,zmin1,zmax1
TEST: #SR 2
"If <set workstation window> signals an error because the specified
workstation window limits are invalid: XMIN>=XMAX, YMIN>=YMAX,
ZMIN>ZMAX, UMIN>=UMAX, or VMIN>=VMAX, it should not cause any
other effect."
pass/fail depending on (system state = PHIGS-open and
workstation state = open and
xmin1=0.1 and xmax=0.9 and ymin=0.1 and ymax=0.9 and
zmin1=0.1 and zmax=0.9)
<set workstation window> with xmin=0.1, xmax=0.8, ymin=0.1, ymax=0.8
<set workstation window> with xmin=0.6, xmax=0.3, ymin=0.9, ymax=0.5:
signals error
Use <inquire workstation transformation> to get:
workstation window limits = xmin1,xmax1,ymin1,ymax1
TEST: #SR 2
"If <set workstation window> signals an error because the specified
workstation window limits are invalid: XMIN>=XMAX, YMIN>=YMAX,
ZMIN>ZMAX, UMIN>=UMAX, or VMIN>=VMAX, it should not cause any
other effect."
pass/fail depending on (system state = PHIGS-open and
workstation state = open and
xmin1=0.1 ans xmax1=0.8 and ymin1=0.1 and ymax1=0.8)
<close workstation> wkid
*** *** *** Results of system-defined error handling *** *** ***
TEST: #SR 2
"If <set workstation window 3> is called and the specified workstation
window limits are invalid: XMIN>=XMAX, YMIN>=YMAX, ZMIN>ZMAX,
UMIN>=UMAX, or VMIN>=VMAX, it should write an accurate,
self-identifying error message on the error file."
pass/fail depending on (next entry in error table = expected values)
TEST: #SR 2
"If <set workstation window 3> is called and the specified workstation
window limits are invalid: XMIN>=XMAX, YMIN>=YMAX, ZMIN>ZMAX,
UMIN>=UMAX, or VMIN>=VMAX, it should write an accurate,
self-identifying error message on the error file."
pass/fail depending on (next entry in error table = expected values)
TEST: #SR 2
"If <set workstation window 3> is called and the specified workstation
window limits are invalid: XMIN>=XMAX, YMIN>=YMAX, ZMIN>ZMAX,
UMIN>=UMAX, or VMIN>=VMAX, it should write an accurate,
self-identifying error message on the error file."
pass/fail depending on (next entry in error table = expected values)
TEST: #SR 2
"If <set workstation window 3> is called and the specified workstation
window limits are invalid: XMIN>=XMAX, YMIN>=YMAX, ZMIN>ZMAX,
UMIN>=UMAX, or VMIN>=VMAX, it should write an accurate,
self-identifying error message on the error file."
pass/fail depending on (next entry in error table = expected values)
TEST: #SR 2
"If <set workstation window> is called and the specified workstation
window limits are invalid: XMIN>=XMAX, YMIN>=YMAX, ZMIN>ZMAX,
UMIN>=UMAX, or VMIN>=VMAX, it should write an accurate,
self-identifying error message on the error file."
pass/fail depending on (next entry in error table = expected values)
TEST: #SR 2
"If <set workstation window> is called and the specified workstation
window limits are invalid: XMIN>=XMAX, YMIN>=YMAX, ZMIN>ZMAX,
UMIN>=UMAX, or VMIN>=VMAX, it should write an accurate,
self-identifying error message on the error file."
pass/fail depending on (next entry in error table = expected values)
TEST: #SR 2
"If <set workstation window> is called and the specified workstation
window limits are invalid: XMIN>=XMAX, YMIN>=YMAX, ZMIN>ZMAX,
UMIN>=UMAX, or VMIN>=VMAX, it should write an accurate,
self-identifying error message on the error file."
pass/fail depending on (next entry in error table = expected values)
END PROGRAM 2