Design: 04.03.02.01/P02

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 2: Colour table length

CHARACTERISTICS: ynnn

OPERATOR SCRIPT: passive test.

DESIGN:

<inquire workstation state table lengths> to determine
   mcte = maximum colour table entries

TEST: #SR 7 8
      "<Inquire workstation state table lengths> should report at least
       2 entries as maximum size of colour table."
pass/fail depending on (mcte >= 2)

Use <inquire list of colour indices> to determine
   nde = number of defined entries and
   mdci = maximum defined colour index
nemp = number of empty entries = mcte - nde
TEST: #SR 7
      "The program should be able to define additional colour table
       entries, up to the maximum."
do ci = mdci+1, mdci+nemp
   set colour table entry, with index = ci
   if error signalled then
      fail
      goto done
   endif
loop

pass

done:

END PROGRAM 2