Design: 03.04/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: Examine conflicting structures
CHARACTERISTICS: nnnn
OPERATOR SCRIPT: passive test.
DESIGN:
open archive file = arid
set up structures as follows:
Archive = CSS =
--------------------- ------------------
112 102 103 109 101 102 105
/ \ | | | / \ |
104 105 108 114 119 104 106 107
\ | | | / | |
110 113 110 112 113
*** *** conflicting networks - root and descendants *** ***
<inquire conflicting structures in network> for CSS structure 102
to determine cssncs = CSS network conflicting structure
TEST: #SR 3
"If the CSS is the structure network source and the
specified structure also exists and has descendants in
the archive file, then <inquire conflicting structures
in network> should return a list of identifiers which exist
in both the archive and the CSS network whose root is the
specified structure."
pass/fail depending on (cssncs = 102,104,110,112)
<inquire conflicting structures in network> for archive structure 105
to determine arcncs = archive network conflicting structure
TEST: #SR 4
"If the archive is the structure network source and the
specified structure also exists and has descendants in
the CSS, then <inquire conflicting structures in network>
should return a list of identifiers which exist in both
the CSS and the archive network whose root is the specified
structure."
pass/fail depending on (arcncs = 105,110)
*** *** conflicting networks - descendants only *** ***
<inquire conflicting structures in network> for CSS structure 106
to determine cssncs = CSS network conflicting structure
TEST: #SR 3
"If the CSS is the structure network source and the
specified structure does not exist in the archive file (but
some descendants do), then <inquire conflicting structures
in network> should return a list of identifiers which exist
in both the archive and the CSS network whose root is the
specified structure."
pass/fail depending on (cssncs = 110, 112)
<inquire conflicting structures in network> for archive structure 108
to determine arcncs = archive network conflicting structure
TEST: #SR 4
"If the archive is the structure network source and the
specified structure does not exist in the CSS (but some
descendants do), then <inquire conflicting structures in
network> should return a list of identifiers which exist in
both the CSS and the archive network whose root is the
specified structure."
pass/fail depending on (arcncs = 113)
*** *** *** *** non-conflicting networks *** *** *** ***
<inquire conflicting structures in network> for CSS structure 101
to determine cssncs = CSS network conflicting structure
TEST: #SR 3
"If the CSS is the structure network source and the
specified structure neither exists nor has descendants in
the archive file, then <inquire conflicting structures
in network> should return an empty list."
pass/fail depending on (cssncs = empty)
<inquire conflicting structures in network> for archive structure 109
to determine arcncs = archive network conflicting structure
TEST: #SR 4
"If the archive is the structure network source and the
specified structure neither exists nor has descendants in
the CSS, then <inquire conflicting structures in network>
should return an empty list."
pass/fail depending on (arcncs = empty)
*** *** *** *** structures conflict *** *** *** ***
<inquire all conflicting structures> to determine
allcfs = all conflicting structures
TEST: #SR 2
"If the same structure identifiers exist in both the CSS and
archive file, then <inquire all conflicting structures>
should return a list of all such identifiers."
pass/fail depending on (allcfs = 102,104,105,110,112,113)
*** *** *** *** disjoint structures *** *** *** ***
<delete all structures from archive> to ensure empty archive
clear CSS
set up archive and CSS as follows:
Archive = CSS =
----------------- ------------
101 102 103 112 115
/ \ | /\
104 105 108 114 116
<inquire all conflicting structures> to determine
allcfs = all conflicting structures
TEST: #SR 2
"If there are no structure identifiers that exist in both
the CSS and archive file, then <inquire all conflicting
structures> should return an empty list."
pass/fail depending on (allcfs = empty)
close archive file
END PROGRAM 2