Design: 04.03.02.02/P03

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 3: WSL colour table initialized properly

CHARACTERISTICS: ynnn

OPERATOR SCRIPT: passive test.

DESIGN:

msgsuf = message suffix = "opening workstation."

check_table:

<open workstation>
<inquire colour facilities> to determine
   npe = number of predefined colour entries in WDT

<inquire list of colour indices> to determine
   sct = size of WSL colour table
TEST: #SR 13 14
      "WSL colour table should be the same size as the
       predefined colour table after " + msgsuf
if sct not= npe then
   fail
   message about sct and npe
else
   pass
endif

TEST: #SR 9 10 13
      "Each WSL colour index should have the same color
       specification as the corresponding predefined colour
       index after " + msgsuf
do ci = 0 to min(npe,sct)-1
  <inquire predefined colour representation> for index ci, determine
    pdcs = predefined colour specification
  <inquire colour representation> for index ci, determine
    dcs = defined colour specification
  if dcs = pdcs then
     OK so far
  else
     fail
     message about ci
     goto end_check
  endif
loop
pass

end_check:
alter table - insert new or different entry
<close workstation>
if (msgsuf = "opening workstation.") then
   msgsuf = "re-opening workstation."
   goto check_table
endif

END PROGRAM 3