Design: 04.02.02.02/P08

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 8: Polymarker 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 polymarker representation>, index #5, polymarker color index = mci

TEST: #SR 15 48 49
      "<Inquire polymarker representation> should report a
       defined polymarker colour index realized as itself."
<inquire polymarker representation>, index #5 to determine
   rpmci = realized polymarker color index
if rpmci = mci then
   pass
else
   fail
   message about rpmci
endif

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

TEST: #SR 15 48 50
      "<Inquire polymarker representation> should report an
       undefined polymarker colour index realized as 1."
<inquire polymarker representation>, index #5 to determine
   rpmci = realized polymarker color index
if rpmci = 1 then
   pass
else
   fail
   message about rpmci
endif

END PROGRAM 8