Design: 04.02.05.02/P09

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 9: Interior color index

CHARACTERISTICS: ynnn

OPERATOR SCRIPT: passive test.

DESIGN:

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

<set interior representation>, index #5, interior color index = mci

TEST: #SR 16 51 52
      "<Inquire interior representation> should report a defined
       interior color index realized as itself."
<inquire interior representation>, index #5 to determine
   rici = realized interior color index
if rici = mci then
   pass
else
   fail
   message about rici
endif

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

TEST: #SR 16 51 53
      "<Inquire interior representation> should report an undefined
       interior color index realized as 1."
<inquire interior representation>, index #5 to determine
   rici = realized interior color index
if rici = 1 then
   pass
else
   fail
   message about rici
endif

END PROGRAM 9