Design: 02.02.01/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: Opening and closing an empty existing structure
CHARACTERISTICS: nnnn
OPERATOR SCRIPT: passive test.
DESIGN:
Use <inquire open structure> throughout to determine:
opstst = open structure status
strid = structure identifier
Use <inquire structure state value> thoughout to determine:
strsta = structure state value open or closed
Use <inquire structure status> throughout to determine:
ststin = structure status indicator
Use <inquire element pointer> throughout to determine:
elepos = element position
TEST: #SR 9
"Before opening PHIGS, <inquire structure state value> should
return the structure state value as CLOSED."
<inquire structure state value>
pass/fail depending on (strsta = CLOSED)
<open phigs>
strid = 50
TEST: #SR 9
"<Inquire structure state value> should return the structure state
value as CLOSED when the CSS is empty after opening PHIGS."
<inquire structure state value>
pass/fail depending on (strsta = CLOSED)
TEST: #SR 6
"If no structures exist, <inquire open structure> should
return a NONE structure status and the structure identifier
is undefined."
<inquire open structure> to set opstst, rstrid
pass/fail depending on
(opstst = NONE)
<inquire structure status> for strid to set ststin
TEST: #SR 7
"<Inquire structure status> should return the appropriate structure
status as NONEXISTENT for a non-existent structure."
pass/fail depending on
(ststin = NONEXISTENT)
<Open structure> with strid
TEST: #SR 9
"<Inquire structure state value> should return the structure state
value as OPEN when an open structure exists in the CSS."
<inquire structure state value>
pass/fail depending on (strsta = OPEN)
<inquire open structure> to set opstst, rstrid
TEST: #SR 1 5
"If an empty structure is open <inquire open structure> should return
an OPEN structure status and the structure identifier of the open
structure."
pass/fail depending on
(opstst = OPEN and
rstrid = strid)
<inquire structure status> for strid to set ststin
TEST: #SR 7
"<Inquire structure status> should return the appropriate structure
status as EMPTY for an empty structure when the structure is open."
pass/fail depending on
(ststin = EMPTY)
<inquire element pointer> to set elepos
TEST: #SR 3 8
"<Inquire element pointer> should return zero as the element pointer
position of an empty structure."
pass/fail depending on
(elepos = 0)
<Close structure>
TEST: #SR 9
"<Inquire structure state value> should return the structure state
value as CLOSED when a closed structure exists in the CSS."
<inquire structure state value>
pass/fail depending on (strsta = CLOSED)
<inquire open structure> to set opstst, rstrid
TEST: #SR 4 6
"If a structure exists, but none is open, <inquire open
structure> should return a NONE structure status and the
structure identifier is undefined."
pass/fail depending on
(opstst = NONE)
<inquire structure status> for strid to set ststin
TEST: #SR 7
"<Inquire structure status> should return the appropriate structure
status as EMPTY for an empty structure when the structure is closed."
pass/fail depending on
(ststin = EMPTY)
<close phigs>
TEST: #SR 9
"After closing PHIGS, <inquire structure state value> should
return the structure state value as CLOSED."
<inquire structure state value>
pass/fail depending on (strsta = CLOSED)
END PROGRAM 1