Design: 09.01.10.01/P03

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 3: Error 2004 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.

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

<open workstation>

<open structure>

<polyline 3> with number of point = -1: signals error
<polymarker> with number of point = -2: signals error
<fill area 3> with number of point = -1: signals error

<add names to set> with number of names in the set = -1: signals error

TEST: #SR 3
      "If <add names to set> signals an error because input parameter
       size is out of range, it should not cause any other effect."
pass/fail depending on (element pointer = 0)

<set highlighting filter> with number of names in inclusive set = -1:
    signals error
<set highlighting filter> with number of names in exclusive set = -1:
    signals error
<set modelling clipping volume> with number of half-spaces in list = -1:
    signals error
<close structure>

<open archive file>
<archive structures> with number of structure identifiers in the list = -1:
    signals error
TEST: #SR 3
      "If <archive structures> signals an error because input
       parameter size is out of range, it should not cause any other
       effect."
pass/fail depending on (no structures in archive)

<retrieve structures> with number of structure identifiers in the list = -1:
    signals error
<delete structures from archive> with number of structure identifier in the
    list = -1: signals error
<close archive file>

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

TEST: #SR 3
      "If <polyline 3> is called and input parameter size is out of
       range, it should return error code 2004, function identifier
       008, and the current error file identifier to the user defined
       error handler."
pass/fail depending on (next entry in error table = expected values)

TEST: #SR 3
      "If <polymarker> is called and input parameter size is out of
       range, it should return error code 2004, function identifier
       011, and the current error file identifier to the user defined
       error handler."
pass/fail depending on (next entry in error table = expected values)

TEST: #SR 3
      "If <fill area 3> is called and input parameter size is out of
       range, it should return error code 2004, function identifier
       016, and the current error file identifier to the user defined
       error handler."
pass/fail depending on (next entry in error table = expected values)

TEST: #SR 3
      "If <add names to set> is called and input parameter size is out
       of range, it should return error code 2004, function identifier
       059, and the current error file identifier to the user defined
       error handler."
pass/fail depending on (next entry in error table = expected values)

TEST: #SR 3
      "If <set highlighting filter> is called and input parameter size
       is out of range, it should return error code 2004, function
       identifier 069, and the current error file identifier to the
       user defined error handler."
pass/fail depending on (next entry in error table = expected values)

TEST: #SR 3
      "If <set highlighting filter> is called and input parameter size
       is out of range, it should return error code 2004, function
       identifier 069, and the current error file identifier to the
       user defined error handler."
pass/fail depending on (next entry in error table = expected values)

TEST: #SR 3
      "If <set modelling clipping volume> is called and input
       parameter size is out of range, it should return error code
       2004, function identifier 079, and the current error file
       identifier to the user defined error handler."
pass/fail depending on (next entry in error table = expected values)

TEST: #SR 3
      "If <archive structures> is called and input parameter size is
       out of range, it should return error code 2004, function
       identifier 116, and the current error file identifier to the
       user defined error handler."
pass/fail depending on (next entry in error table = expected values)

TEST: #SR 3
      "If <retrieve structures> is called and input parameter size is
       out of range, it should return error code 2004, function
       identifier 121, and the current error file identifier to the
       user defined error handler."
pass/fail depending on (next entry in error table = expected values)

TEST: #SR 3
      "If <delete structures from archive> is called and input
       parameter size is out of range, it should return error code
       2004, function identifier 126, and the current error file
       identifier to the user defined error handler."
pass/fail depending on (next entry in error table = expected values)

END PROGRAM 3