Design: 02.01.02.02/P05

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 5: Deletion of a structure network with the reference flag
           set to delete and references are not made to the
           open specified structure

CHARACTERISTICS: ynnn

OPERATOR SCRIPT: passive test

DESIGN:

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

                   100
                  /  \
                 /    \
               1/      \2
               /        \
              /          \
          101              102     120   130             140
          | |             / | \     |    /|               |
         1| |2           /  |  \    |   / |              1|
          | |          1/  2|  3\  1|  /1 |2              |
          | |          /    |    \  | /   |               |
          103         /     |     \ |/    |              142
                   104     105     106   107
                   | |       |     |    / /\
                  1| |2     /|\    |   / /  \
                   | |    1/ | \3 1| 1/ /2   \3
                   109    /  |  \  | / /      \
                         /   |   \ |/ /       113
                       110   |    108
                             |     |
                             |     |1
                             |2    |
                             |     |
                             |    111
                             |   / |
                             | 1/  |
                             | /  2|
                             |/    |
                            114   115


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

TEST: #SR 1 3 4
      "When the reference handling flag is set to delete
       and the open specified structure is not referenced
       outside the structure network the following changes
       should occur to the CSS:
       All closed structures contained in a structure network
       are removed.
       The specified structure is OPEN and EMPTY."

specf = 120
reffg = DELETE
<open structure> specf
<post structure> specf
<delete structure network> using specf, reffg

pass/fail depending on (CSS contents =

                   100
                  /  \
                 /    \
               1/      \2
               /        \
              /          \
          101              102     120   130             140
          | |             / |       |     |               |
         1| |2           /  |      0|     |              1|
          | |          1/  2|       |     |1              |
          | |          /    |             |               |
          103         /     |             |              142
                   104     105           107
                   | |      |             |
                  1| |2    1|             |1
                   | |      |             |
                   109      |             |
                           110           113     )

TEST: #SR 1
      "<Delete structure network> with the reference flag set to
       delete and an open specified structure which is not referenced
       outside the structure network 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 and
    specf = strref) then
    pass
    <close structure>
else
    fail
endif

TEST: #SR 1
      "<Delete structure network> with the reference flag set to
       delete and an open specified structure which is not referenced
       outside the structure network should cause that structure
       to exist in the CSS as an empty structure."

use <inquire structure status> on the specified structure to determine
    strsti = structure status identifier

pass/fail depending on (strsti = EMPTY)

TEST: #SR 10
      "<Delete structure network> should cause the open specified structure
       not referenced outside the structure network to become unposted from
       the workstation when the reference handling flag is set to delete."

Use inquire posted structures to determine:
   pstnum = number of posted structures

<inquire posted structures> pstnum
pass/fail depending on (pstnum = 0)

END PROGRAM 5