Design: 06.03/P01

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 1: Setting and inquiring the workstation transformation

CHARACTERISTICS: ynnn

OPERATOR SCRIPT: passive test.

DESIGN:

TEST: #SR 1 2
      "<Inquire display space size 3> should report the maximum
       display volume size as positive numbers in both DC and
       addressable units."
<inquire display space size 3> to determine
   dcun   = device coordinate units
   dcmax  = maximum size in DC units
   admax  = maximum size in addressable units
dcinfo = (no error reported  and
          dcmax, admax > 0 )
pass/fail depending on (dcinfo)

TEST: #SR 2 4
      "The reported DC units should be either METRES or OTHER."
pass/fail depending on (dcun = METRES or dcun = OTHER)

TEST: #SR 1 2 3
      "<Inquire display space size> should report the same values
       as <inquire display space size 3> for DC units and for the
       first two dimensions of the display space."
<inquire display space size> to determine
   dcun2  = device coordinate units
   dcmx2 = maximum size in DC units
   admx2 = maximum size in addressable units
pass/fail depending on (dcun2  = dcun           and
                        dcmx2 = dcmax for x-y  and
                        admx2 = admax for x-y)

Use some limit values, some non-limit
<set workstation window 3>
  pxlo = 0.0   pxhi = 1.0
  pylo = 0.2   pyhi = 0.8
  pzlo = 0.1   pzhi = 1.0

TEST: #SR 1 6 8 12 14
      "Requested workstation window should be reported by
       <inquire workstation transformation 3> as most recently
       set by <set workstation window 3>."
<inquire workstation transformation 3> to determine requested 3D window:
  rpxlo, rpxhi, rpylo, rpyhi, rpzlo, rpzhi
pass/fail depending on (rpxlo = pxlo  and
                        rpxhi = pxhi  and
                        rpylo = pylo  and
                        rpyhi = pyhi  and
                        rpzlo = pzlo  and
                        rpzhi = pzhi)

TEST: #SR 1 6 8 13 14
      "Requested workstation window should be reported by
       <inquire workstation transformation> as most recently
       set by <set workstation window 3>."
<inquire workstation transformation> to determine requested 2D window:
  rpxlo, rpxhi, rpylo, rpyhi
pass/fail depending on (rpxlo = pxlo  and
                        rpxhi = pxhi  and
                        rpylo = pylo  and
                        rpyhi = pyhi)

if (not dcinfo) then
   message: skipping viewport_3 tests because no DC information
   goto end_viewport_3
endif

Use result of <inquire display space size 3> in following:

Use some limit values, some non-limit:
<set workstation viewport 3>
  dxlo = 0.0*dcmax_x   dxhi = 0.4*dcmax_x
  dylo = 0.8*dcmax_y   dyhi = 1.0*dcmax_y
  dzlo = 0.0*dcmax_z   dzhi = 0.1*dcmax_z

TEST: #SR 1 9 11 12 14
      "Requested workstation viewport should be reported by
       <inquire workstation transformation 3> as most recently
       set by <set workstation viewport 3>."
<inquire workstation transformation 3> to determine requested
   3D viewport: rdxlo, rdxhi, rdylo, rdyhi, rdzlo, rdzhi
pass/fail depending on (rdxlo = dxlo  and
                        rdxhi = dxhi  and
                        rdylo = dylo  and
                        rdyhi = dyhi  and
                        rdzlo = dzlo  and
                        rdzhi = dzhi)

TEST: #SR 1 9 11 13 14
      "Requested workstation viewport should be reported by
       <inquire workstation transformation> as most recently
       set by <set workstation viewport 3>."
<inquire workstation transformation> to determine requested
   2D viewport: rdxlo, rdxhi, rdylo, rdyhi
pass/fail depending on (rdxlo = dxlo  and
                        rdxhi = dxhi  and
                        rdylo = dylo  and
                        rdyhi = dyhi)

end_viewport_3:

Use some limit values, some non-limit
<set workstation window>
  pxlo = 0.0   pxhi = 0.4
  pylo = 0.6   pyhi = 1.0

TEST: #SR 1 7 8 12 14
      "Requested workstation window should be reported by
       <inquire workstation transformation 3> as most recently
       set by <set workstation window>, with z-values unchanged."
<inquire workstation transformation 3> to determine requested 3D window:
  rpxlo, rpxhi, rpylo, rpyhi, rpzlo, rpzhi
pass/fail depending on (rpxlo = pxlo  and
                        rpxhi = pxhi  and
                        rpylo = pylo  and
                        rpyhi = pyhi  and
                        rpzlo = pzlo  and
                        rpzhi = pzhi)

if (not dcinfo) then
   message: skipping viewport tests because no DC information
   goto end_viewport
endif

Use result of <inquire display space size 3> in following:

<set workstation viewport>
  dxlo = 0.8*dcmax_x   dxhi = 0.9*dcmax_x
  dylo = 0.1*dcmax_y   dyhi = 0.2*dcmax_y

TEST: #SR 1 10 11 12 14
      "Requested workstation viewport should be reported by
       <inquire workstation transformation 3> as most recently
       set by <set workstation viewport>, with z-values
       unchanged."
<inquire workstation transformation 3> to determine requested
   3D viewport: rdxlo, rdxhi, rdylo, rdyhi, rdzlo, rdzhi
pass/fail depending on (rdxlo = dxlo  and
                        rdxhi = dxhi  and
                        rdylo = dylo  and
                        rdyhi = dyhi  and
                        rdzlo = dzlo  and
                        rdzhi = dzhi)

end_viewport:

if (not dcinfo) then
   message: skipping flat_viewport tests because no DC information
   goto end_flat_viewport
endif

Use result of <inquire display space size 3> in following:

Set up viewport with zero thickness in z-dimension
<set workstation viewport 3>
  dxlo = 0.0*dcmax_x   dxhi = 0.4*dcmax_x
  dylo = 0.8*dcmax_y   dyhi = 1.0*dcmax_y
  dzlo = 0.3*dcmax_z   dzhi = dzlo

TEST: #SR 1 9 11 12 14
      "Requested flat workstation viewport should be reported by
       <inquire workstation transformation 3> as most recently
       set by <set workstation viewport 3>, with unchanged
       window."
<inquire workstation transformation 3> to determine requested
   3D viewport: rdxlo, rdxhi, rdylo, rdyhi, rdzlo, rdzhi
   3D window:   rpxlo, rpxhi, rpylo, rpyhi, rpzlo, rpzhi
pass/fail depending on (rdxlo = dxlo  and  rpxlo = pxlo  and
                        rdxhi = dxhi  and  rpxhi = pxhi  and
                        rdylo = dylo  and  rpylo = pylo  and
                        rdyhi = dyhi  and  rpyhi = pyhi  and
                        rdzlo = dzlo  and  rpzlo = pzlo  and
                        rdzhi = dzhi  and  rpzhi = pzhi)

end_flat_viewport:

Set up window with zero thickness in z-dimension
<set workstation window 3>
  pxlo = 0.1   pxhi = 1.0
  pylo = 0.0   pyhi = 0.9
  pzlo = 0.0   pzhi = pzlo

TEST: #SR 1 6 8 12 14
      "Requested flat workstation window should be reported by
       <inquire workstation transformation 3> as most recently
       set by <set workstation window 3>, with unchanged
       viewport."
<inquire workstation transformation 3> to determine requested
   3D viewport: rdxlo, rdxhi, rdylo, rdyhi, rdzlo, rdzhi
   3D window:   rpxlo, rpxhi, rpylo, rpyhi, rpzlo, rpzhi
pass/fail depending on (rdxlo = dxlo  and  rpxlo = pxlo  and
                        rdxhi = dxhi  and  rpxhi = pxhi  and
                        rdylo = dylo  and  rpylo = pylo  and
                        rdyhi = dyhi  and  rpyhi = pyhi  and
                        rdzlo = dzlo  and  rpzlo = pzlo  and
                        rdzhi = dzhi  and  rpzhi = pzhi)

END PROGRAM 1