Design: 02.01.02.01/P04

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 4: Deletion of multiple structures

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 (0-2) represent the element position of the <execute structure>
function within the calling structure.

TEST: #SR 1 2
      "Changes to the CSS should be reflected when deleting more than
       one structure."

delstr = 103
<delete structure> delstr

examine the contents of the CSS for the existing structure identifiers
and the associated element references
if (CSS contents <>
        105,   100
         |      |
        0|     1|
         |      |
               104     102
                 \     / \
                 1\  1/   \2
                   \ /     \
                   106     109
                   / \     / \
                 1/   \2 1/   \2
                 /     \ /     \
               107     108     110   ) then

   goto fail_test
endif

delstr = 106
<delete structure> delstr

examine the contents of the CSS for the existing structure identifiers
and the associated element references
if (CSS contents <>
        105,   100,      107,      102
         |      |         |         |
        0|     1|        0|        1|
         |      |         |         |
               104                 109
                                   / \
                                 1/   \2
                                 /     \
                               108     110   ) then
   goto fail_test
endif

delstr = 102
<delete structure> delstr

examine the contents of the CSS for the existing structure identifiers
and the associated element references
if (CSS contents <>
        105,   100,      107,      109
         |      |         |        / \
        0|     1|        0|      1/   \2
         |      |         |      /     \
               104             108     110   ) then
   goto fail_test
endif

delstr = 110
<delete structure> delstr

examine the contents of the CSS for the existing structure identifiers
and the associated element references
if (CSS contents <>
        105,   100,      107,      109
         |      |         |         |
        0|     1|        0|        1|
         |      |         |         |
               104                 108    ) then
   goto fail_test
else
   pass
   goto done
endif

fail_test:

fail
generate informative message that failure is due to deletion of
   structure # delstr

done:

END PROGRAM 4