Design: 06.02.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: Update status of view table for INPUT workstations

CHARACTERISTICS: nnnn

OPERATOR SCRIPT: passive test.

DESIGN:

linwk = list of accessible workstations of category INPUT

if (linwk is empty) then
   message: no INPUT workstations to be tested
   goto done
endif

TEST: #SR 26 29
      "For all workstations of category INPUT, the view
       transformation update state of all entries in the view
       table should always be NOTPENDING and reported as such."

for each iwk in linwk
   <open workstation> iwk
   <Inquire list of view indices> to determine
      ndvi = number of defined indices in the view table
   <Set display update state> to WAIT, NIVE to try to defer
      updates

   testvw = ndvi/2
   <inquire view representation> on testvw to determine original
      requested state:

      orvom(4,4) = orientation matrix
      orvmm(4,4) = mapping matrix
      orvclm(6)  = view clipping limits
      orvcid(3)  = clipping indicators

   generate different values:
   nwvom  = orvom elements + 1.0
   nwvmm  = orvmm elements + 1.0
   nwvclm = orvclm / 2 + 0.1
   if (requested x-y clip indicator = CLIP) then
      nwvcid = NOCLIP, NOCLIP, NOCLIP
   else
      nwvcid = CLIP, CLIP, CLIP
   endif

   <set view representation 3> on testvw with
      nwvom, nwvmm, nwvclm, nwvcid

   <inquire view representation> on testvw to determine new
      current state:
      vwtupd     = view transformation update state
      cuvom(4,4) = current orientation matrix
      cuvmm(4,4) = current mapping matrix
      cuvclm(6)  = current view clipping limits
      cuvcid(3)  = current clipping indicators

   <close workstation> iwk

   if (vwtupd not= NOTPENDING) then
      fail
      message about vwtupd
      goto done
   endif

   if ( cuvom   = nwvom   and
        cuvmm   = nwvmm   and
        cuvclm  = nwvclm  and
        cuvcid  = nwvcid )   then
      OK so far
   else
      fail
      message about current values
      goto done
   endif

next iwk
pass

done:

END PROGRAM 7