Design: 09.01.03.02/P17

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 17: Error 118 handled by system

CHARACTERISTICS: ynny

OPERATOR SCRIPT:
See OPERATOR SCRIPT for Program 1.

DESIGN:
Throughout this program, every time an error is signalled (as noted
by the tag "signals error"), the system-defined error handler should
call <error logging> to write an error message on the error file.

Set one of the components of the colour specification out of range for every
valid colour model to test if function 69 generates error 118: ignoring
function, one of the components of the colour specification is out of range.

*** *** ***  Generate errors; test absence of side effects  *** *** ***

<open workstation> wkid
Use <inquire colour model facilities> to determine:
   nclmod = number of colour models
   lclmod(1:nclmod) = list of available colour models

for ix = 1 to nclmod
   <set colour model> to lclmod(ix)
   spec1 = {0.5,0.5,0.5}
   <set colour representation> with wkid,index=2,spec1
   col = {-0.5,0.,1.}
   <set colour representation> wkid, index=2, col: signals error
   Use <inquire colour specification> with index=2 to get:
      spec2 = components of colour specification
TEST: #SR 17
      "If <set colour representation> signals an error because one of the
       components of the colour specification is out of range, it should
       not cause any other effect."
pass/fail depending on (system state = PHIGS-open and
                        workstation state = open and
                        spec1 = spec2)

   <set colour representation> wkid, 2, 0., 1.5, 0.5: signals error

   <set colour representation> wkid, 2, 0., 0.5,  -1.: signals error

next ix
<close workstation> wkid

*** *** ***  Results of system-defined error handling  *** *** ***

for ix = 1 to nclmod

TEST: #SR 17
      "If <set colour representation> is called and one of the components of
       the colour specification is out of range,
       it should write an accurate, self-identifying error message
       on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 17
      "If <set colour representation> is called and one of the components of
       the colour specification is out of range,
       it should write an accurate, self-identifying error message
       on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 17
      "If <set colour representation> is called and one of the components of
       the colour specification is out of range,
       it should write an accurate, self-identifying error message
       on the error file."
pass/fail depending on (operator verifies error message)

next ix

END PROGRAM 17