Design: 04.02.04.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

*** ***   Annotation text character height   *** ***
<set annotation text character height>:
    character_height = 2.35

TEST: #SR 3 42
      "<Inquire current element type and size> should return
       annotation text character height as the type of the
       created element and the appropriate element size."

<inquire current element type and size> for current element type and
appropriate size
pass/fail depending on
  (current_element_type = annotation text character height and
   celsiz = values specified by the standard)

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

*** ***   Annotation text character up vector   *** ***
<set annotation text character up vector>:
    character_up_vector_x_component = -4.25
    character_up_vector_y_component = -5.13

TEST: #SR 3 70
      "<Inquire current element type and size> should return
       annotation text character up vector as the type of the
       created element and the appropriate element size."

<inquire current element type and size> for current element type
  and appropriate size
pass/fail depending on
  (current_element_type = annotation text character up vector and
   celsiz = values specified by the standard)

TEST: #SR 4 70
      "<Inquire current element content> should return the standard
       representation for the annotation text character up vector
       value."
<inquire current element content> for current element representation
pass/fail depending on
  (celval = (-4.25, -5.13) and
   recval = auxiliary values specified by the standard)

*** *** ***   Annotation text path   *** *** ***
<set annotation text path>:
    annotation text relative_path = LEFT

TEST: #SR 3 55
      "<Inquire current element type and size> should return
       annotation text path as the type of the created element and
       the appropriate element size."

<inquire current element type and size> for current element type and
appropriate size
pass/fail depending on
  (current_element_type = annotation text path and
   celsiz = values specified by the standard)

TEST: #SR 4 55 56
      "<Inquire current element content> should return the standard
       representation for all valid annotation text path values."

for txpath = RIGHT, LEFT, UP, and DOWN
   <set annotation text path> with annotation text relative_path = txpath
   <inquire current element content> for current element representation
   if (celval = txpath and
       recval = auxiliary values specified by the standard)
       OK so far
   else
      fail
      informative message on txpath
      goto donepath
   endif
next txpath

pass

donepath:

*** *** ***   Annotation text alignment   *** *** ***
<set annotation text alignment>:
    horizonal_annotation text relative_alignment = CENTRE
    vertical_annotation text relative_alignment  = BASE
TEST: #SR 3 63
      "<Inquire current element type and size> should return
       annotation text alignment as the type of the created
       element and the appropriate element size."

<inquire current element type and size> for current element type and
appropriate size
pass/fail depending on
  (current_element_type = annotation text alignment and
   celsiz = values specified by the standard)

TEST: #SR 4 63 64
      "<Inquire current element content> should return the standard
       representation for all valid annotation text alignment values."

for txhor = NORMAL, LEFT, CENTRE, and RIGHT
for txver = NORMAL, TOP, CAP, HALF, BASE, and BOTTOM

   <set annotation text alignment> with
      horizonal_annotation text relative_alignment = txhor
      vertical_annotation text relative_alignment  = txver
   <inquire current element content> for current element representation
   if (celval = (txhor, txver) and
       recval = auxiliary values specified by the standard)
       OK so far
   else
      fail
      informative message on (txhor, txver)
      goto donealign
   endif
next txver
next txhor

pass

donealign:

*** *** ***   Annotation style   *** *** ***
<set annotation style>:
    annotation style = -7

TEST: #SR 3 75
      "<Inquire current element type and size> should return
       annotation style as the type of the created element and
       the appropriate element size."

<inquire current element type and size> for current element type and
  appropriate size
pass/fail depending on
  (current_element_type = annotation style and
   celsiz = values specified by the standard)

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

END PROGRAM 1