Design: 04.02.05.04/P06

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 6: Pattern color index array

CHARACTERISTICS: ynnn

OPERATOR SCRIPT: passive test.

DESIGN:

if (PATTERN is not in list of available interior styles) then
   message about Pattern not supported on workstation
   goto done
endif

loop thru color table to determine:
  mci = maximum defined color index
undci = mci + 1 = undefined color index

<set pattern representation>, index #5,
   pattern color index array =   mci mci
                                 mci mci

TEST: #SR 6 20
      "<Inquire pattern representation> should report a defined
       pattern color index in the pattern color index array
       realized as itself."
<inquire pattern representation>, index #5 to determine
   rcolia = realized pattern color index array
pass/fail depending on (rcolia = mci mci
                                 mci mci)

TEST: #SR 19
      "Any non-negative color index specified in the pattern color
       index array should be accepted as valid."
<set pattern representation>, index #5,
   pattern color index array = undci undci
                               undci undci
if error signalled then
   fail
   message about undci
else
   pass
endif

TEST: #SR 6 21
      "<Inquire pattern representation> should report an undefined
       color index in the pattern color index array realized as 1."
<inquire pattern representation>, index #5 to determine
   rcolia = realized pattern color index array
pass/fail depending on (rcolia = 1 1
                                 1 1)

done:

END PROGRAM 6