Design: 04.02.05.02/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: ynnn

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 index   *** *** *** *** ***
<set interior index>:
    interior_index = 8

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

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

*** ***  interior representation set and inquire *** ***

<set interior representation>:
  index         = 2
  style         = HOLLOW
  style_index   = 1
  colour        = 5
<inquire interior representation> for index #2, as set

TEST: #SR 12 15
      "Interior attributes should be returned as set."
pass/fail depending on
   (style       = HOLLOW  and
    style_index = 1       and
    colour      = 5)

END PROGRAM 1