Design: 09.01.01.02/P05

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

CHARACTERISTICS: nnny

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> at least once to write an error message on the error file.

Not open structure after initializing to test if functions
8,13,17,24,29,34, 37,57,59,61,75,79,92,97,101 generate error 5;
ignoring function, function requires state (PHOP,*,STOP,*)

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

n = 2
pxa = (0., 0.5)
pya = (0., 0.5)
pza = (0., 0.5)
<polyline3> with (n, pxa, pya, pza) : signals error
TEST: #SR 5
      "If <polyline 3> signals an error because PHIGS is open but no
       structure is open, it should not cause any other effect."
pass/fail depending on (system state = PHIGS-open and
                        structure state = closed)

<text> with (0.5, 0.5, 'text') : signals error

pxa = (0.,0.5,0.5,0.)
pya = (0.,0.,0.5,0.5)
<fill area> with (n, pxa, pya) : signals error

<set polyline index> to 1 : signals error

<set linetype> to solid line : signals error

<set polymarker colour index> to 1 : signals error

<set character expansion factor> to 1.0 : signals error

<set edge flag> to 1 : signals error

nameset(1)=1
<add names to set> with nameset : signals error

<set individual asf> to polyline and individual : signals error

xfrmt = identity matrix
<set local transformation> with xfrmt and REPLACE : signals error

op = PMCREP
n = 1
halfsp = (0.52, 0., -1., 0., 0.48, 0., 1., 0.)
<set modelling clipping volume> with op, n, halfsp : signals error

<execute structure> 101 : signals error
TEST: #SR 5
      "If <execute structure> signals an error because PHIGS is open
       but no structure is open, it should not cause any other
       effect."
pass/fail depending on (system state = PHIGS-open and
                        structure state = closed)

<copy all elements from structure> : signals error
TEST: #SR 5
      "If <copy all elements from structure> signals an error
       because PHIGS is open but no structure is open, it should not
       cause any other effect."
pass/fail depending on (system state = PHIGS-open and
                        structure state = closed)

<delete element> : signals error
TEST: #SR 5
      "If <delete element> signals an error because PHIGS is open
       but no structure is open, it should not cause any other
       effect."
pass/fail depending on (system state = PHIGS-open and
                        structure state = closed)

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

TEST: #SR 5
      "If <polyline 3> is called and PHIGS is open but no structure
       is open, it should write an accurate, self-identifying error
       message on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 5
      "If <text> is called and PHIGS is open but no structure is open,
       it should write an accurate, self-identifying error message
       on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 5
      "If <fill area> is called and PHIGS is open but no structure is open,
       it should write an accurate, self-identifying error message
       on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 5
      "If <set polyline index> is called and PHIGS is open but no structure
       is open, it should write an accurate, self-identifying error
       message on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 5
      "If <set linetype> is called and PHIGS is open but no structure is
       open, it should write an accurate, self-identifying error
       message on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 5
      "If <set polymarker colour index> is called and PHIGS is open but
       no structure is open, it should write an accurate, self-identifying
       error message on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 5
      "If <set character expansion factor> is called and PHIGS is open
       but no structure is open, it should write an accurate,
       self-identifying error message on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 5
      "If <set edge flag> is called and PHIGS is open but no structure
       is open, it should write an accurate, self-identifying error
       message on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 5
      "If <add names to set> is called and PHIGS is open but no structure
       is open, it should write an accurate, self-identifying error
       message on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 5
      "If <set individual asf> is called and PHIGS is open but no structure
       is open, it should write an accurate, self-identifying error
       message on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 5
      "If <set local transformation> is called and PHIGS is open but no
       structure is open, it should write an accurate, self-identifying
       error message on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 5
      "If <set modelling clipping volume> is called and PHIGS is open but
       no structure is open, it should write an accurate, self-identifying
       error message on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 5
      "If <execute structure> is called and PHIGS is open but no structure
       is open, it should write an accurate, self-identifying error
       message on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 5
      "If <copy all elements from structure> is called and PHIGS is open
       but no structure is open, it should write an accurate,
       self-identifying error message on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 5
      "If <delete element> is called and PHIGS is open but no structure
       is open, it should write an accurate, self-identifying error
       message on the error file."
pass/fail depending on (operator verifies error message)

END PROGRAM 5