Design: 04.02.02.01/P03

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 3: Combinations 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.

VARIOUS MARKER SIZE SCALE FACTORS: Normally, several pairs of
markers, one actual, one simulated (type o, *, or +) are drawn.
Identify the pair (only one) where both markers are the same
size.  The simulated and actual types need not match exactly in
appearance, especially in the case of an asterisk, but the
diameters should be the same.  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.

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

call NDMW to set marker size to a non-default value, preferably
   half the distance between markers to be displayed
Display in random order all marker types in lavsmt, with
   colors drawn randomly from foreground colors

TEST: #SR 3 4 5 6 8
      "The mandatory marker types (1-5) should be recognizable from
       their standard description, even when a non-default marker
       size or color is used."

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

call NDMW to set marker size to a non-default value, preferably
   half the distance between markers to be displayed
Display in random order all marker types in lunsup, with
   colors drawn randomly from foreground colors

TEST: #SR 3 4 5 6 7 8
      "Unavailable marker types should be displayed as marker type
       number 3, even when a non-default marker size or color is used."

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

call NDMW to set marker size to a non-default value, preferably
   half the distance between markers to be displayed
Display in random order all marker types in mardis, with
   colors drawn randomly from foreground colors

TEST: #SR 3 4 5 6 9
      "The registered non-mandatory marker types (> 5) should
       agree with their registered description, even when a
       non-default marker size or color is used."

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

call NDMW to set marker size to a non-default value, preferably
   half the distance between markers to be displayed
Display in random order all marker types in mardis, with
   colors drawn randomly from foreground colors

TEST: #SR 3 4 5 6 10
      "Implementor-defined marker types (< 1) should agree with the
       descriptions supplied by the implementor, even when a
       non-default marker size or color is used."

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")

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:
next_mw:
ndmkst = randomly selected +,*,o marker type
pmcol  = randomly selected color index

OPQA/VARIOUS MARKER SIZE SCALE FACTORS: invoke SHOWMW subroutine to
  test requested marker size = thismw
       expected  marker size = thismw
       marker type           = ndmkst
       color index           = pmcol
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, even when a non-default
       marker type or color is used."
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,
       even when a non-default marker type or color is used."

ndmkst = randomly selected +,*,o marker type
pmcol  = randomly selected color index

OPQA/POSITIVE MARKER SIZE BELOW MINIMUM: invoke subroutine SHOWMW
  to test requested marker size = minmw/2
          expected  marker size = minmw
          marker type           = ndmkst
          color index           = pmcol
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, even when a non-default
       marker type or color is used."

ndmkst = randomly selected +,*,o marker type
pmcol  = randomly selected color index

OPQA/NEGATIVE MARKER SIZE: invoke subroutine SHOWMW to test
  requested marker size = -maxmw-100
  expected  marker size = minmw
  marker type           = ndmkst
  color index           = pmcol
pass/fail depending on return code from SHOWMW

ndmkst = randomly selected +,*,o marker type
pmcol  = randomly selected color index

OPQA/POSITIVE MARKER SIZE ABOVE MAXIMUM: invoke subroutine SHOWMW
  to test requested marker size = maxmw*2
          expected  marker size = maxmw
          marker type           = ndmkst
          color index           = pmcol
if abort indicate
   message about marker size too big for the scrren
else
   TEST: #SR 3 13 14 16
         "A requested marker size scale factor above the maximum
          available should be realized as the maximum, even when a
          non-default marker type or color is used."
   pass/fail depending on return code from SHOWMW
endif

color_indx:
*** *** ***   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, even when a non-default marker type or marker size
       is used."

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.

call NDMw to set marker size to a non-default values, preferably
   half the distance between markers to be displayed
for ix = 1 to nummar
   set entry mkcol(ix) to bckcol
   draw marker #ix with polymarker colour index = mkcol(ix),
      and label it using markertype = random choice from lavsmt
      (but not dot), lavrmt, lavimt
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, even when a non-default marker type or marker
       size is used."

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

call NDMw to set marker size to a non-default values, preferably
   half the distance between markers to be displayed

draw star with color #1

display interleaved:
  three markers of color u1,u2,u3,
  explct markers of color #1, for each using marker type = random
     choice from lavsmt (but not dot), lavrmt, lavilt

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

END PROGRAM 3