Design: 04.02.05.04/P03
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 3: Pattern table length
CHARACTERISTICS: ynnn
OPERATOR SCRIPT: passive test.
DESIGN:
nopat = true iff no pattern interior style
if (nopat) then
message about Pattern not supported on workstation
endif
<inquire workstation state table lengths> to determine
mpte = maximum pattern table entries
if (nopat) then
TEST: #SR 8 9
"If PATTERN interior style is not supported, <inquire
workstation state table lengths> should report 0
entries as maximum size of pattern table."
pass/fail depending on (mpte = 0)
goto done
endif
TEST: #SR 8 10
"If PATTERN interior style is supported, <inquire
workstation state table lengths> should report at least 10
entries as maximum size of pattern table."
pass/fail depending on (mpte >= 10)
Use <inquire list of pattern indices> to determine
nde = number of defined entries and
mdpi = maximum defined pattern index
nemp = number of empty entries = mpte - nde
TEST: #SR 8
"The program should be able to define additional pattern table
entries, up to the maximum."
do ii = mdpi+1, mdpi+nemp
set pattern table entry, with index = ii
if error signalled then
fail
goto done
endif
loop
pass
done:
END PROGRAM 3