Design: 04.02.01.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: Element creation 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

*** *** *** *** ***   Linetype   *** *** *** *** ***
ltval = 33
<set linetype>:
    linetype = ltval

TEST: #SR 1 4
      "<Inquire current element type and size> should return
       linetype 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 = linetype and
   celsiz               = values specified by the standard)

TEST: #SR 2 4
      "<Inquire current element content> should return the standard
       representation for the linetype value."
<inquire current element content> for current element representation
pass/fail depending on
  (celval = ltval and
   recval = auxiliary values specified by the standard)

*** *** *** *** ***   Linewidth scale factor   *** *** *** *** ***
<set linewidth scale factor>:
    linewidth_scale_factor = 0.45

TEST: #SR 1 13
      "<Inquire current element type and size> should return linewidth
       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 = linewidth_scale_factor
   celsiz               = values specified by the standard)

TEST: #SR 2 13
      "<Inquire current element content> should return the standard
       representation for the linewidth scale factor value."
<inquire current element content> for current element representation
pass/fail depending on
  (celval = 0.45 and
   recval = auxiliary values specified by the standard)

*** *** *** *** ***   Polyline colour index   *** *** *** *** ***
<set polyline colour index>:
    polyline_colour_index = 6

TEST: #SR 1 19
      "<Inquire current element type and size> should return
       polyline 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 = polyline_colour_index
   celsiz               = values specified by the standard)

TEST: #SR 2 19
      "<Inquire current element content> should return the standard
       representation for the polyline colour index value."
<inquire current element content> for current element representation
pass/fail depending on
  (celval = 6 and
   recval = auxiliary values specified by the standard)

END PROGRAM 1