Design: 04.02.05.04/P04
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 4: Validity of predefined pattern table
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
mpci = maximum predefined color index
Use <inquire pattern facilities> to determine
npe = number of predefined entries
if (nopat) then
TEST: #SR 11 14
"If PATTERN interior style is not supported, <inquire
pattern facilities> should report 0 predefined indices."
pass/fail (npe=0)
goto done
endif
colerr = false = color error found yet
TEST: #SR 11 12 15
"<Inquire predefined pattern representation> should be able to
access as many entries as reported by <inquire pattern facilities>."
do ii = 1 to npe
<inquire predefined pattern representation> for ii to determine
colia = pattern color index array
if error then
fail
goto more_tests
endif
for each color index in colia
if color index < 0 or > mpci then
colerr = true
erpci = erroneous color index
endif
loop
loop
pass
TEST: #SR 12 18
"All color indices in predefined pattern color index array should
themselves be in the predefined color table."
if colerr then
fail
message about erpci
else
pass
endif
more_tests:
TEST: #SR 11 13
"If PATTERN interior style is supported, <inquire pattern
facilities> should report at least 1 predefined entry."
pass/fail depending on (npe >= 1)
done:
END PROGRAM 4