Design: 05.03/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: Setting and inquiring display priorities
CHARACTERISTICS: ynnn
OPERATOR SCRIPT: passive test.
DESIGN:
<open workstation> wkid
Use <inquire number of display priorities supported> to determine:
ndpsup = number of display priorities supported
informative message on ndpsup
TEST: #SR 16 17
"<Inquire number of display priorities supported> should
report the number of display priorities for any specific
workstation type as 0 or >= 2."
if (no error reported and (ndpsup = 0 or ndpsup >= 2)) then
pass
else
fail
informative message: skipping further tests
goto done
endif
strpri = (0.0, 0.67, 1.0) = array of display priorities
strid = (101, 102, 103) = array of structure identifiers
for istr = 1 to 3
<post structure> wkid, strid(istr), strpri(istr)
loop
if (ndpsup = 0) then
TEST: #SR 3 15 16 18
"A workstation with the number of display priorities
equal to 0 should report any valid display priority
exactly as it was set."
<inquire posted structures> for wkid to determine
lps = list of posted structures
if (number of entries in lps = 3) then
pass/fail depending on
(lps contains entry:[strid(istr), strpri(istr)] for istr = 1,2,3)
else
fail
endif
else
TEST: #SR 3 15 16 19
"A workstation with the number of display priorities
equal to at least 2 should be able to distinguish the
highest and lowest valid priority."
Use <inquire posted structures> to determine:
pri1 = the reported display priority for structure 101
pri2 = the reported display priority for structure 103
pass/fail depending on (pri1 < pri2)
endif
done:
<close workstation> wkid
END PROGRAM 2