Design: 02.01.02.02/P14

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 14: Effect of deleting structure networks on element pointer

CHARACTERISTICS: nnnn

OPERATOR SCRIPT: passive test

DESIGN:

Set up CSS as:

                               40
                                |       50
                             D:41      /  \
                                |     /    \
                               42   100   D:51
                                |  / |\    / |
                               43 /  | \4 /  |
    20                          |/3  |  511  |
   /  \                        44    |       |
  /    \                             |       |
21    D:22   -----------------------/ \     /
       /  \ 1|       2|            /   \6  /
      /    \ |        |  D:60     /     \ /
     /      \|      D:30    \    /\     512
   221      222       / \    \ 5/  \7    |
             |       /   \    \/    \    |
             |     31     32  61    70  5121
            2221


The nodes of the graph (20 and above) represent structures, and
the labelled edges are references to invoke (lower) structures.
The labels (1- 7) represent the element position of the <execute
structure> function within structure #100.  The structures that
are specified by <delete structure network> are prefaced by "D:".

Structure 100 is left open.

Throughout, the expected state is shown as the sequence of
references within structure #100, with the current element
marked by an asterisk.  Thus the first state is:

   (222, 30*, 44, 511, 61, 512, 70)

set edit mode to REPLACE
informational message: following test cases run in REPLACE mode

set element pointer to 2
delete structure network #30, ref-flag = DELETE
TEST: #SR 12
      "When <delete structure network> causes deletion of
       references at the current element, the element pointer
       should be changed so as to point to the preceding element."
pass/fail depending on (current element position = 1)
(222*, 44, 511, 61, 512, 70)

delete structure network #22, ref-flag = DELETE
TEST: #SR 12
      "When <delete structure network> causes deletion of
       references at the current element, the element pointer
       should be changed to zero when there is no preceding
       element."
pass/fail depending on (current element position = 0)
(* 44, 511, 61, 512, 70)

set edit mode to INSERT
informational message: following test cases run in INSERT mode

delete structure network #41, ref-flag = DELETE
TEST: #SR 11
      "When <delete structure network> causes deletion of
       references following the current element, the element
       pointer should be unchanged."
pass/fail depending on (current element position = 0)
(* 511, 61, 512, 70)

set element pointer to 2
delete structure network #51, ref-flag = DELETE
TEST: #SR 11
      "When <delete structure network> causes deletion of
       references surrounding the current element, the element pointer
       should be changed so as to point to the same element."
pass/fail depending on (current element position = 1)
(61*, 70)

set element pointer to 2
delete structure network #60, ref-flag = KEEP
TEST: #SR 11
      "When <delete structure network> does not cause deletion of
       a reference in the open structure because the reference
       flag is KEEP, the element pointer should be unchanged."
pass/fail depending on (current element position = 2)
(61, 70*)

END PROGRAM 14