Design: 04.02.02.01/P02

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 2: Appearance of individual attributes

CHARACTERISTICS: ynny

OPERATOR SCRIPT:

MANDATORY MARKER TYPES: This screen should display examples of
each of the mandatory marker types actually supported by the
implementation.  You should not consider whether all 5 are
present, but simply whether each marker type is recognizable from
the verbal description.  Enter a list of integers which identify
the marker types in the same order as they appear in the prompt.

UNSUPPORTED MARKER TYPES: This screen should display several
asterisks and one non-asterisk marker.  Identify the non-asterisk
marker.

NON-MANDATORY REGISTERED MARKER TYPES: This screen displays a
sample of supported registered marker types (at most 8).  For
each displayed marker, look up its marker type identifier in the
ISO register and verify that the actual appearance of the marker
agrees with the ISO specification.

IMPLEMENTOR DEFINED MARKER TYPES: This screen displays a sample of
implementor defined marker types (at most 8).  For each displayed
marker, look up its marker type identifier in the implementor's
documentation and verify that the actual appearance of the marker
agrees with the specification.

COMPLETE DOCUMENTATION FOR IMPLEMENTOR MARKER TYPES: No associated
picture.  Verify that all the entries in the list of available
marker types for this workstation type are documented by the
implementor.  The list may be a subset of the documented
marker types.

VARIOUS MARKER SIZE SCALE FACTORS: Normally, several pairs of
plus signs are drawn.  Identify the pair (only one) where both
markers (plus sign) are the same size.  In case the marker size
is too large for several to fit on the screen, only one is drawn
and its size must fit within those of the surrounding dotted
circles.  Since this is centered on the screen it may (validly)
overlap the dialog area.

POSITIVE MARKER SIZE BELOW MINIMUM: as above, for VARIOUS MARKER
SIZE SCALE FACTORS.

NEGATIVE MARKER SIZE: as above, for VARIOUS MARKER SIZE SCALE
FACTORS.

POSITIVE MARKER SIZE ABOVE MAXIMUM: as above, for VARIOUS MARKER
SIZE SCALE FACTORS.

MARKER SIZE OF MARKER TYPE 1: This screen displays several dots
to the right of a vertical line and one dot, the reference dot,
to the left of the line.  Count up and report the number of dots
(on the right) which are the same size as the reference dot.

DEFINED POLYMARKER COLOR INDICES: All markers but one are drawn in
the background color.  Identify the single marker drawn in the
default foreground color.

UNDEFINED POLYMARKER COLOR INDICES: A star is drawn with several
markers beneath it.  Normally, all of these will be the
same color as the star.  Count up and report the number of markers
which match the star in color.


DESIGN:

use <inquire polymarker facilities> to determine:
  nummt  = number of marker types
  lavsmt = list of available standard marker types
  lavrmt = list of available registered (non-mandatory) marker types
  lavimt = list of available implementor-defined marker types
           (may be derived directly from marker type value, if
            reported number of marker types < 0)
  nummw  = number of available marker-sizes
  nommw  = nominal marker-size (DC)
  minmw,maxmw = minimum,maximum marker-size (DC)

*** *** ***   1. marker type

Use default background color=0, foreground=1

Display in random order all marker types in lavsmt

TEST: #SR 3 4 5 6 8
      "The mandatory marker types (1-5) should be recognizable from
       their standard description."

OPQA/MANDATORY MARKER TYPES: List, in order, the numeric labels
  for marker types: dot, plus sign, asterisk, circle, diagonal
  cross.
pass/fail depending on (all displayed marker types correctly identified)

lunsup = list of (mostly) unsupported marker types, contains:
  a negative unsupported type, if available
  a positive unsupported type
  0, if not supported
  3,
  2,4, or 5 if supported (the non-asterisk, non-dot one)

if (2,4,5 not available) then
   goto end_asterisk
endif

Display in random order marker types from lunsup

TEST: #SR 3 4 5 6 7 8
      "Unavailable marker types should be displayed as marker type
       number 3."

OPQA/UNSUPPORTED MARKER TYPES: Which marker is NOT an asterisk?
pass/fail depending on (the non-asterisk marker type (2,4, or 5) selected)

end_asterisk:

regdx = size of lavrmt
if regdx < 1 skip to neg_type

if regdx < 9
   mardis = markers to be displayed = all marker types in lavrmt
else
   mardis = markers to be displayed = 8 marker types randomly selected
                                      from lavrmt
endif

display in order and label all marker types in mardis

TEST: #SR 3 4 5 6 9
      "The registered non-mandatory marker types (> 5) should
       agree with their registered description."

OPQA/NON-MANDATORY REGISTERED MARKER TYPES: Is each marker type
  depicted according to its numeric identifier's specification in
  the ISO register?
pass/fail depending on (operator responds "yes")

neg_type:

impdx = size of lavimt
if impdx < 1 skip to end_marker type

if impdx < 9
   mardis = markers to be displayed = all marker types in lavimt
else
   mardis = markers to be displayed = 8 marker types randomly selected
                                    from lavimt
endif
display in order and label all marker types in mardis

TEST: #SR 3 4 5 6 10
      "Implementor-defined marker types (< 1) should agree with the
       descriptions supplied by the implementor."

OPQA/IMPLEMENTOR DEFINED MARKER TYPES: Is each marker type
  depicted according to its numeric identifier's specification in
  the implementor documentation?
pass/fail depending on (operator responds "yes")

if (impdx <= 8 or nummt < 0) then
   either all implementor marker types already shown or
   marker type appearance derived directly from value - skip test
   goto end_marker type
endif

TEST: #SR 10
      "All reported implementor-defined marker types available for a
       given workstation type should be documented by the
       implementor."

OPQA/COMPLETE DOCUMENTATION FOR IMPLEMENTOR MARKER TYPES: Are all
  these reportedly available marker types documented by the
  implementor: <lavimt> ?
pass/fail depending on (operator responds "yes")

end_marker type:

*** *** ***   2. marker size scale factor

from dialog common:
  wcpdc  = WC unit / DC unit
  qvis   = minimum distinguishable length in DC-units

Are there at least two visually distinguishable marker sizes?
if (nummw .eq. 1)           or
   (maxmw <= 1.02 * minmw)  or
   (maxmw-minmw < qvis)    then
   only one distinguishable:
   tstmw1 = first marker size to be tested = maxmw
   tstmw2 = last marker size to be tested = tstmw1
   mult = 2
else
   tstmw1 = first marker size to be tested = minmw
   tstmw2 =  last marker size to be tested = maxmw
   if (nummw .eq. 0) then
      continuous range of marker sizes available - take 4
         geometric steps
      mult = 0.9999 * ((tstmw2/tstmw1) ** 0.25)
   else
      discrete set of marker sizes available - test min/max only
      mult = 0.9999 * (tstmw2/tstmw1)
   endif
endif

numpas = 0 = number of tests passed so far
thismw = tstmw1

loop thru various marker sizes
next_mw:
OPQA/VARIOUS MARKER SIZE SCALE FACTORS: invoke SHOWMW subroutine to
  test requested marker size = thismw
        expected marker size = thismw
if abort indicated
   if (numpas < 2) then
      message about marker size too big for the screen
      goto min_max_coerce
   else
      goto do_test_msg
   endif
elseif failure indicated
   numpas = 0
   goto do_tst_msg
endif

numpas = numpas+1
set up for next marker size to be tested:
thismw = thismw * mult
if thismw <= tstmw2 goto next_mw

do_tst_msg:
TEST: #SR 3 13 14 15
      "Available marker size scale factors should control the
       realized size of a polymarker."
pass/fail depending on (numpas > 0)

min_max_coerce:

TEST: #SR 3 13 14 16
      "A requested positive marker size scale factor below the
       minimum available should be realized as the minimum."
OPQA/POSITIVE MARKER SIZE BELOW MINIMUM: invoke subroutine SHOWMW
  to test requested marker size = minmw/2
          expected marker size = minmw
pass/fail depending on return code from SHOWMW

TEST: #SR 3 13 14 16
      "A requested negative marker size scale factor should be
       realized as the minimum."
OPQA/NEGATIVE MARKER SIZE: invoke subroutine SHOWMW to test
  requested marker size = -maxmw-100
  expected marker size = minmw
pass/fail depending on return code from SHOWMW

OPQA/POSITIVE MARKER SIZE ABOVE MAXIMUM: invoke subroutine SHOWMW
  to test requested marker size = maxmw*2
          expected marker size = maxmw
if abort indicated
   message about marker size too big for the screen
else
   TEST: #SR 3 13 14 16
         "A requested marker size scale factor above the maximum
          available should be realized as the maximum."
   pass/fail depending on return code from SHOWMW
endif

*** *** *** marker type 1

set marker type = 1

nummar = number of markers to be drawn = random integer from 3 to 7
lmssf = list of marker sizes, contains:
   minmw/2, maxmw*2, -2.76, (minmw+maxmw)/2, minmw, maxmw, nommw

draw reference dot and vertical line separator

for ix = 1 to nummar
   draw marker with marker size = lmssf(ix)
next ix

TEST: #SR 3 4 5 13 14 17
      "Marker type 1 should be rendered as the smallest
       displayable dot, regardless of the marker size scale
       factor value."

OPQA/MARKER SIZE OF MARKER TYPE 1: How many dots to the right of
  the vertical line are the same size as the dot to the left of the
  line?
pass/fail depending on (number of dots = nummar)

*** *** ***   3. polymarker color index

TEST: #SR 3 20 21 22
      "A defined polymarker color index should cause the addressed
       entry in the color table to be used when rendering a
       polymarker."

bckcol = background color = realized color spec for entry #0
forcol = foreground color = realized color spec for entry #1

szcolt = maximum size of color table (including entry #0)
nummar = number of markers to be drawn = min(8, szcolt)
mkcol  = random permutation of #0,#1, and nummar-2 random choices
         from entries #2 to #szcolt-1
visdx = from mkcol, randomly select an entry to be made visible
        but not the one that contains 0, since this may not be
        re-settable.

for ix = 1 to nummar
   set entry mkcol(ix) to bckcol
   draw marker #ix with polymarker colour index = mkcol(ix), and label it
next ix

set entry mkcol(visdx) to forcol

OPQA/DEFINED POLYMARKER COLOR INDICES: Which marker is visible?
pass/fail depending on (response = marker colored by visdx)

end_def_col:

TEST: #SR 3 20 21 23
      "An undefined polymarker color index should cause entry
       number 1 in the color table to be used when rendering
       a polymarker."

set entry #1 in color table opposite from BCKCOL
set entry #1 different from FORCOL - make sure undefined default
  to *current* color-rep of #1, not just a predefined color.

u1,u2,u3 = 3 undefined, positive color indices - all greater
  than maximum defined entry in color table
expmct = number of explicit markers of color #1 = random integer
   from 0 to 4

draw star with color #1

display interleaved:
  three markers of color u1,u2,u3,
  explct markers of color #1

OPQA/UNDEFINED POLYMARKER COLOR INDICES: How many markers are the
  same color as the star?
pass/fail depending on response = 3+explct

END PROGRAM 2