Design: 02.01.02.03/P02

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 2: Deletion of all structures with an open structure

CHARACTERISTICS: nnnn

OPERATOR SCRIPT: passive test

DESIGN:

Use <open structure> and <execute structure> to set up the CSS
as follows:


               100
               / \
             1/   \2
             /     \
          103       104     102
         / \          \     / \
       1/   \2        1\  1/   \2
       /     \          \ /     \
     105     105        106     109
                        / \     / \
                      1/   \2 1/   \2
                      /     \ /     \
                    107     108     110

The nodes of the graph (100 and above) represent structures, and the
labelled edges are references to invoke (lower) structures.  The
labels (1-2) represent the element position of the <execute structure>
function within the calling structure.

TEST: #SR 1
      "<Delete all structures> with an open structure should
       remove all closed structures from the CSS."

strid = 106
<open structure> strid
<delete all structures>

Use <inquire structure identifiers> to determine
    nstid = number of structure identifiers
    nstr  = nth structure identifier

<inquire structure identifiers> nstid, nstr
pass/fail depending on (nstid = 1 and nstr = 106)

TEST: #SR 2
      "<Delete all structures> with an open structure should cause
       that structure to exist in the CSS as an open structure."

use <inquire open structure> to determine
    stype = the structure status open or close
    strref = structure id

if (stype <> open  or
    strid <> strref) then
    fail
else
    pass
    <close structure>
endif

TEST: #SR 2
      "<Delete all structures> with an open structure should cause
       that structure to exist in the CSS as an empty structure."

use <inquire structure status> on strid to determine
    strsti = structure status idenitifier

pass/fail depending on (strsti = empty)


END PROGRAM 2