Design: 03.05/P01

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 1: Delete specified structures from archive

CHARACTERISTICS: nnnn

OPERATOR SCRIPT: passive test.

DESIGN:

set up standard networks in CSS
open new archive file, with arid = archive identifier

<archive all structures>, into arid
allstr = all structures = 100,101,102,103,104,105,106,107,108,109
                          110,111,113,114,115,120,130,140,142
spcstr = specified structures = 103,105,113

<delete structures from archive> arid, spcstr
<retrieve structure identifiers> with arid
   to determine actstr = actual list of archived structures
TEST: #SR 1 4
      "Only the structures explicitly listed as parameters of <delete
       structures from archive> should be deleted from the specified
       open archive file."
pass/fail depending on (actstr = (allstr - spcstr))


delete with structure identifier not in archive
spcstr = 155

<delete structures from archive> arid, spcstr
<retrieve structure identifiers> with arid
   to determine newstr = new list of archived structures
TEST: #SR 1 5
      "If the specified structure does not exist in the archive file,
       then <delete structures from archive> should result in no
       action for that structure."
pass/fail depending on (newstr = actstr)
TEST: #SR 1 5
      "If the specified structure does not exist in the archive file,
       then <delete structures from archive> should signal error 407."
pass/fail depending on (error = 407)


delete with structure identifiers both in and not-in archive
spcstr = 102, 177, 142

<delete structures from archive> arid, spcstr
<retrieve structure identifiers> with arid
   to determine actstr = new list of archived structures
TEST: #SR 1 4 5
      "If the list of specified structures to be deleted from the archive
       file contains structures that exist and do not exist in the
       archive file, then those structures that exist should be deleted
       from the archive and no action is taken for those structures that
       do not exist in the archive file."
pass/fail depending on (actstr = (newstr - structures 102 and 142))
TEST: #SR 1 5
      "If the list of specified structures to be deleted from the
       archive file contains structures that do not exist in the
       archive file, then error 407 should be signalled."
pass/fail depending on (error = 407)

<close archive file> with arid

END PROGRAM 1