Design: 04.02.05.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: Simple setting and inquiring
CHARACTERISTICS: nnnn
OPERATOR SCRIPT: passive test.
DESIGN:
Use <inquire current element content> throughout to determine:
celval = current element value as set by program
recval = auxiliary element values implied by the standard's
representation conventions.
Use <inquire current element type and size> throughout to determine:
celsiz = current element size
*** *** *** *** *** Interior style *** *** *** *** ***
<set interior style>:
interior_style = PATTERN
TEST: #SR 1 5
"<Inquire current element type and size> should return
interior style as the type of the created element and the
appropriate element size."
<inquire current element type and size> for current element type
pass/fail depending on
(current_element_type = interior_style and
celsiz = values specified by the standard)
TEST: #SR 2 5 6
"<Inquire current element content> should return the
standard representation for all valid interior style
values."
for istyle = HOLLOW, SOLID, PATTERN, HATCH, and EMPTY
<set interior style> with interior_style = istyle
<inquire current element content> for current element representation
if (celval = istyle and
recval = auxiliary values specified by the standard)
OK so far
else
fail
informative message on istyle
goto donestyle
endif
next istyle
pass
donestyle:
*** *** *** *** *** Interior style index *** *** *** *** ***
<set interior style index>:
interior_stlye_index = 5
TEST: #SR 1 18
"<Inquire current element type and size> should return
interior style index as the type of the created element
and the appropriate element size."
<inquire current element type and size> for current element type
pass/fail depending on
(current_element_type = interior_style_index and
celsiz = values specified by the standard)
TEST: #SR 2 18
"<Inquire current element content> should return the
standard representation for the interior style index
value."
<inquire current element content> for current element representation
pass/fail depending on
(celval = 5 and
recval = auxiliary values specified by the standard)
*** *** *** *** *** Interior colour index *** *** *** *** ***
<set interior colour index>:
interior_colour_index = 2
TEST: #SR 1 26
"<Inquire current element type and size> should return
interior colour index as the type of the created element
and the appropriate element size."
<inquire current element type and size> for current element type
pass/fail depending on
(current_element_type = interior_colour_index and
celsiz = values specified by the standard)
TEST: #SR 2 26
"<Inquire current element content> should return the
standard representation for the interior colour index
value."
<inquire current element content> for current element representation
pass/fail depending on
(celval = 2 and
recval = auxiliary values specified by the standard)
*** *** *** *** Pattern size *** *** *** ***
<set pattern size>:
pattern_size = (4.1, 5.1)
TEST: #SR 1 61
"<Inquire current element type and size> should return
pattern size as the type of the created element and the
appropriate element size."
<inquire current element type and size> for current element type
pass/fail depending on
(current_element_type = pattern_size and
celsiz = values specified by the standard)
TEST: #SR 2 61
"<Inquire current element content> should return the
standard representation for the pattern size value."
<inquire current element content> for current element representation
pass/fail depending on
(celval = (4.1, 5.1) and
recval = auxiliary values specified by the standard)
*** *** *** *** Pattern reference point and vectors *** *** *** ***
<set pattern reference point and vectors>:
pattern_reference_point = (0.5, 0.7, 0.9)
vector_1 = (1.1, 1.5, 1.9)
vector_2 = (1.3, 1.7, 2.1)
TEST: #SR 1 66
"<Inquire current element type and size> should return
pattern reference point and vectors as the type of the
created element and the appropriate element size."
<inquire current element type and size> for current element type
pass/fail depending on
(current_element_type = pattern_reference_point_and_vectors and
celsiz = values specified by the standard)
TEST: #SR 2 66
"<Inquire current element content> should return the
standard representation for the pattern reference point
and vectors values."
<inquire current element content> for current element representation
pass/fail depending on
(celval = refpt (0.5, 0.7, 0.9);
vec1 (1.1, 1.5, 1.9);
vec2 (1.3, 1.7, 2.1) and
recval = auxiliary values specified by the standard)
*** *** *** *** Pattern reference point *** *** *** ***
<set pattern reference point>:
pattern_reference_point = (0.35, 0.21)
TEST: #SR 1 67
"<Inquire current element type and size> should return
pattern reference point as the type of the created element
and the appropriate element size."
<inquire current element type and size> for current element type
pass/fail depending on
(current_element_type = pattern_reference_point
celsiz = values specified by the standard)
TEST: #SR 2 67
"<Inquire current element content> should return the
standard representation for the pattern reference point
values."
<inquire current element content> for current element representation
pass/fail depending on
(celval = (0.35, 0.21) and
recval = auxiliary values specified by the standard)
*** *** *** *** *** Edge flag *** *** *** *** ***
<set edge flag>:
edge_flag = ON
TEST: #SR 1 32
"<Inquire current element type and size> should return edge
flag as the type of the created element and the
appropriate element size."
<inquire current element type and size> for current element type
pass/fail depending on
(current_element_type = edge_flag and
celsiz = values specified by the standard)
TEST: #SR 2 32 33
"<Inquire current element content> should return the
standard representation for all valid edge flag values."
for eflag = OFF, ON
<set edge flag> with edge_flag = eflag
<inquire current element content> for current element representation
if (celval = eflag and
recval = auxiliary values specified by the standard)
OK so far
else
fail
informative message on eflag
goto doneflag
endif
next eflag
pass
doneflag:
*** *** *** *** *** Edgetype *** *** *** *** ***
<set edgetype>:
edgetype = 6
TEST: #SR 1 40
"<Inquire current element type and size> should return
edgetype as the type of the created element and the
appropriate element size."
<inquire current element type and size> for current element type
pass/fail depending on
(current_element_type = edgetype and
celsiz = values specified by the standard)
TEST: #SR 2 40
"<Inquire current element content> should return the
standard representation for the edgetype value."
<inquire current element content> for current element representation
pass/fail depending on
(celval = 6 and
recval = auxiliary values specified by the standard)
*** *** *** *** Edgewidth scale factor *** *** *** *** ***
<set edgewidth scale factor>:
edgewidth_scale_factor = 0.33
TEST: #SR 1 49
"<Inquire current element type and size> should return
edgewidth scale factor as the type of the created element
and the appropriate element size."
<inquire current element type and size> for current element type
pass/fail depending on
(current_element_type = edgewidth_scale_factor and
celsiz = values specified by the standard)
TEST: #SR 2 49
"<Inquire current element content> should return the
standard representation for the edgewidth scale factor
value."
<inquire current element content> for current element representation
pass/fail depending on
(celval = 0.33 and
recval = auxiliary values specified by the standard)
*** *** *** *** *** Edge colour index *** *** *** *** ***
<set edge colour index>:
edge_colour_index = 3
TEST: #SR 1 55
"<Inquire current element type and size> should return edge
colour index as the type of the created element and the
appropriate element size."
<inquire current element type and size> for current element type
pass/fail depending on
(current_element_type = edge_colour_index and
celsiz = values specified by the standard)
TEST: #SR 2 55
"<Inquire current element content> should return the
standard representation for the edge colour index value."
<inquire current element content> for current element representation
pass/fail depending on
(celval = 3 and
recval = auxiliary values specified by the standard)
END PROGRAM 1