Design: 04.02.05.04/P05
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 5: WSL pattern table initialized properly
CHARACTERISTICS: ynnn
OPERATOR SCRIPT: passive test.
DESIGN:
msgsuf = message suffix = "opening workstation."
check_table:
<open workstation>
if (PATTERN is not in list of available interior styles) then
message about Pattern not supported on workstation
goto done
endif
<inquire pattern facilities> to determine
npe = number of predefined pattern entries in WDT
<inquire list of pattern indices> to determine
spt = size of WSL pattern table
TEST: #SR 16 17
"WSL pattern table should be the same size as the WDT
predefined pattern table after " + msgsuf
if spt = npe then
pass
else
fail
message about spt and npe
endif
TEST: #SR 11 15 16
"Each WSL pattern table entry should have the same
attributes as the corresponding predefined pattern table
entry after " + msgsuf
do ii = 1 to min(npe,spt)
<inquire predefined pattern representation> for index ii, determine
pdcia = predefined pattern color index array
pddx = predefined dx -pattern array dimension
pddy = predefined dy -pattern array dimension
<inquire pattern representation> for index ii, determine
dcia = defined pattern color index array
ddx = defined dx -pattern array dimension
ddy = defined dy -pattern array dimension
if dcia = pdcia then
OK so far
else
fail
message about ii
goto end_check
endif
loop
pass
end_check:
alter pattern table - insert new or different entry
<close workstation>
if (msgsuf = "opening workstation.") then
msgsuf = "re-opening workstation."
goto check_table
endif
done:
END PROGRAM 5