Design: 09.01.01.01/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: Error 2 handled by user

CHARACTERISTICS: ynnn

OPERATOR SCRIPT: See OPERATOR SCRIPT for Program 1.

DESIGN:

Throughout this program, every time an error is signalled (as noted
by the tag "signals error"), the user-defined error handler saves the
error code, function identifier, and error file identifier in an error
table.  Since PHIGS is closed, the error file identifier is not checked.

Close phigs after initializing to test if functions 2, 96, 104,
106, 110, 114, 119 generates error 2: ignoring function, function
requires state (PHOP,*,*,*).

*** *** *** Generate errors; test absence of side effects  *** *** ***

<close phigs>
<open workstation> : signals error
TEST: #SR 2
      "If <open workstation> signals an error because PHIGS is
       closed, it should not cause any other effect."
pass/fail depending on (system state = PHIGS-closed)

mode = random choice of INSERT or REPLACE
<set edit mode> using mode : signals error
TEST: #SR 2
      "If <set edit mode> signals an error because PHIGS is closed,
       it should not cause any other effect."
pass/fail depending on (system state = PHIGS-closed)

<empty structure> 101 : signals error
TEST: #SR 2
      "If <empty structure> signals an error because PHIGS is
       closed, it should not cause any other effect."
pass/fail depending on (system state = PHIGS-closed)

dsnt = random choice of DELETE or KEEP
<delete structure network> using 101, dsnt : signals error

<change structure identifier and references> from 101 to 102 : signals error

<open archive file> with 11, 24 : signals error
TEST: #SR 2
      "If <open archive file> signals an error because PHIGS is
       closed, it should not cause any other effect."
pass/fail depending on (system state = PHIGS-closed)

arccr = random choice of MAINTAIN, ABANDON, or UPDATE
retcr = random choice of MAINTAIN, ABANDON, or UPDATE
<set conflict resolution> with arccr, retcr : signals error

*** *** ***  Results of user-defined error handling  *** *** ***

TEST: #SR 2
      "If <open workstation> is called and PHIGS is closed,
       it should return error code  002 and function identifier  002 to the
       user defined error handler."
pass/fail depending on (next entry in error table = expected values)

TEST: #SR 2
      "If <set edit mode> is called and PHIGS is closed,
       it should return error code  002 and function identifier  096 to the
       user defined error handler."
pass/fail depending on (next entry in error table = expected values)

TEST: #SR 2
      "If <empty structure> is called and PHIGS is closed,
       it should return error code  002 and function identifier  104 to the
       user defined error handler."
pass/fail depending on (next entry in error table = expected values)

TEST: #SR 2
      "If <delete structure network> is called and PHIGS is closed,
       it should return error code  002 and function identifier  106
       to the user defined error handler."
pass/fail depending on (next entry in error table = expected values)

TEST: #SR 2
      "If <change structure identifier and references> is called and
       PHIGS is closed, it should return error code  002 and function
       identifier  110 to the user defined error handler."
pass/fail depending on (next entry in error table = expected values)

TEST: #SR 2
      "If <open archive file> is called and PHIGS is closed,
       it should return error code  002 and function identifier  114 to the
       user defined error handler."
pass/fail depending on (next entry in error table = expected values)

TEST: #SR 2
      "If <set conflict resolution> is called and PHIGS is closed,
       it should return error code  002 and function identifier  119
       to the user defined error handler."
pass/fail depending on (next entry in error table = expected values)

END PROGRAM 2