Design: 09.01.04.02/P07

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 7: Error 157 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 in error message on the error file.

Setting workstation viewport limits to the values out of display space to test
if functions 88,89 generate error 157: ignoring function, the workstation
viewport is not within display space.

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

<open workstation> wkid
Use <inquire display space size 3> to determine:
   dx3,dy3,dz3 = maximum display space size in device display coordinate units
Use <inquire display space size> to determine:
   dx2,dy2 = maximum display space size in device display coordinate units

xx = dx3/2
yy = dy3/2
zz = dz3/2
<set workstation viewport 3> with viewport limits = {0.,xx,0.,yy,0.,zz}
<set workstation viewport 3> with viewport limits =
      {-0.1,dx3,0.,dy3, 0.,dz3}: signals error
Use <inquire workstation transformation 3> to get:
     current viewport limits: xmin1,xmax1,ymin1,ymax1,zmin1,zmax1
TEST: #SR 7
      "If <set workstation viewport 3> signals an error because the specified
       workstation viewport is not within display space, it should not cause
       any other effect."
pass/fail depending on (system state = PHIGS-open and
                        workstation state = open  and
                        xmin1=0. and xmax1=xx and ymin1=0. and ymax1=yy
                        and zmin1=0 and zmax1=zz)

<set workstation viewport 3> with viewport limits =
      {0.,dx3,0.,dy3+0.1,0.,dz3}: signals error

<set workstatioin viewport 3> with viewport limits =
      {0.,dx3,0.,dy3,-0.1,dz3+0.1}: signals error

<set workstation viewport> with viewport limits =
      {-0.1,dx2,0.,dy2}: signals error

<set workstation viewport> with viewport limits =
      {0.,dx2,0.,dy2+0,1}: signals error

xx=dx2/2
yy=dy2/2
<set workstation viewport> with window limits = {0.,xx,0.,yy}
<set workstaiton viewport> with window limits =
      {-0.1,dx2,0.,dy2+0.1}: signals error
Use <inquire workstation transformation> to get:
     viewport limits: xmin1,xmax1,ymin1,ymax1
TEST: #SR 7
      "If <set workstation viewport> signals an error because the specified
       workstation viewport is not within display space, it should not cause
       any other effect."
pass/fail depending on (system state = PHIGS-open and
                        workstaton state = open   and
                        xmin1=0. and xmax1=xx and ymin1=0. and ymax=yy)

<close workstation> wkid

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

TEST: #SR 7
      "If <set workstation viewport 3> is called and the specified
       workstation viewport is not within display space, it should write
       an accurate, self-identifying error message on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 7
      "If <set workstation viewport 3> is called and the specified
       workstation viewport is not within display space, it should write
       an accurate, self-identifying error message on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 7
      "If <set workstation viewport 3> is called and the specified
       workstation viewport is not within display space, it should
       write an accurate, self-identifying error message
       on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 7
      "If <set workstation viewport> is called and the specified
       workstation viewport is not within display space, it should
       write an accurate, self-identifying error message
       on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 7
      "If <set workstation viewport> is called and the specified
       workstation viewport is not within display space, it should
       write an accurate, self-identifying error message
       on the error file."
pass/fail depending on (operator verifies error message)

TEST: #SR 7
      "If <set workstation viewport> is called and the specified
       workstation viewport is not within display space, it should
       write an accurate, self-identifying error message
       on the error file."
pass/fail depending on (operator verifies error message)

END PROGRAM 7