Design: 06.02.02/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: View index

CHARACTERISTICS: ynnn

OPERATOR SCRIPT: passive test.

DESIGN:

Use <inquire current element type and size> throughout to determine:
    celtyp = current element type
    celsiz = current element size

Use <inquire current element content> throughout to determine:
    celcon = current element content

<set view index> 0

TEST: #SR 1 2
      "<Inquire current element type and size> should return
       view index as the type of the created element
       and the appropriate element size."
<inquire current element type and size> to set celtyp, celsiz
pass/fail depending on
  (celtyp = view index and
   celsiz = values specified by the standard and language binding)

TEST: #SR 1 3
      "<Inquire current element content> should return the standard
       representation for view index, when the index is 0."
<inquire current element content> to set celcon
pass/fail depending on
  (celcon = representation as specified by the standard and language binding)

<inquire workstation state table lengths> to determine
   unavid = view index not available for primary workstation type
TEST: #SR 1 3
      "Any non-negative view index should be accepted as valid,
       even if not supported by some workstation types."
<set view index> to unavid
if error signalled then
   fail
   write message about view index
   go to done
endif
<inquire current element content> to determine if view index set
pass/fail depending on
  (celcon = standard representation for view index = unavid)

done:

END PROGRAM 1