Design: 04.01.08/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: Generalized drawing primitive

CHARACTERISTICS: ynnn

OPERATOR SCRIPT: passive test.

DESIGN:

Use <inquire current element type and size> throughout to determine:
    celtyp = current element type
    celsiz = current element size

Use <inquire current element content> throughout to determine:
    celcon = current element content

n = 5
xarr = 0.0  -99.99  .00013  3.2e-12  -3.4e23
yarr = 4.2  0.0  99.99  0.0  .002
zarr = 34.2  1.4  .032e2  99e2  0.0

dr = data record to hold
integers: 174, 175, 176
reals:    17.4,17.5,17.6
strings:  "This is a GDP test string.", "This is another."

*** *** *** *** ***   Generalized drawing primitive 3   *** *** *** *** ***

TEST: #SR 4
      "<Inquire list of available generalized drawing primitives 3>
       should be able to return the list of GDP 3 identifiers."

Use <inquire list of available generalized drawing primitives 3> to
   obtain list of GDP 3 identifiers - gdplist

pass/fail depending on (no errors returned from function).

TEST: #SR 5
      "<Inquire generalized drawing primitive 3> should be able to
       return the list of sets of attributes used by a given GDP 3
       identifier."

For each gdpid in gdplist
   Use <inquire generalized drawing primitive 3> to
       get list of sets of attributes.
   if invalid values from function
      fail
      informative message about gdpid
      goto donelist3
   endif
next gdpid

pass

donelist3:

select ugdpid = not in gdplist (unsupported)

<generalized drawing primitive 3> with ugdpid, xarr,yarr,zarr, dr

TEST: #SR 1 2
      "<Inquire current element type and size> should return
       generalized drawing primitive 3 as the type of the created
       element and the appropriate element size."
<inquire current element type and size> to set celtyp, celsiz
pass/fail depending on
  (celtyp = generalized drawing primitive 3 and
   celsiz = values specified by the standard and language binding)

TEST: #SR 1 3
      "<Inquire current element content> should return the standard
       representation for a generalized drawing primitive 3."
<inquire current element content> to set celcon
pass/fail depending on
  (celcon = representation as specified by the standard and language binding)

*** *** *** *** ***   Generalized drawing primitive   *** *** *** *** ***

TEST: #SR 9
      "<Inquire list of available generalized drawing primitives>
       should be able to return the list of GDP identifiers."

Use <inquire list of available generalized drawing primitives> to
   obtain list of GDP identifiers - gdplist

pass/fail depending on (no errors returned from function).

TEST: #SR 10
      "<Inquire generalized drawing primitive> should be able to
       return the list of sets of attributes used by a given GDP
       identifier."

For each gdpid in gdplist
   Use <inquire generalized drawing primitive> to
       get list of sets of attributes.
   if invalid values from function
      fail
      informative message about gdpid
      goto donelist
   endif
next gdpid

pass

donelist:

select ugdpid = not in gdplist (unsupported)

<generalized drawing primitive> with ugdpid, xarr,yarr, dr

TEST: #SR 6 7
      "<Inquire current element type and size> should return
       generalized drawing primitive as the type of the created
       element and the appropriate element size."
<inquire current element type and size> to set celtyp, celsiz
pass/fail depending on
  (celtyp = generalized drawing primitive and
   celsiz = values specified by the standard and language binding)

TEST: #SR 6 8
      "<Inquire current element content> should return the standard
       representation for a generalized drawing primitive."
<inquire current element content> to set celcon
pass/fail depending on
  (celcon = representation as specified by the standard and language binding)

END PROGRAM 1