Design: 04.02.05.03/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: Edge 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 edge representation>, index #5, edge color index = mci

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

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

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

END PROGRAM 9