Design: 06.03/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: Update control of the workstation transformation
CHARACTERISTICS: ynnn
OPERATOR SCRIPT: passive test.
DESIGN:
<Set display update state> to WAIT, NIVE to try to defer
updates
<inquire workstation transformation 3> to determine original
current state:
ocwin = 3D window
ocvwp = 3D viewport
alter workstation transformation:
<set workstation window 3> = nwwin = ocwin / 2
<set workstation viewport 3> = nwvwp = ocvwp / 2
<inquire workstation transformation 3> to determine new
current state:
wtupd = workstation transformation update state
cuwin = new 3D window
cuvwp = new 3D viewport
TEST: #SR 15
"The workstation transformation update state returned by
<inquire workstation transformation 3> should be either
PENDING or NOTPENDING."
if (wtupd = NOTPENDING) then
pass
message: skipping PENDING test
goto notpending_test
elseif (wtupd = PENDING) then
pass
else
fail
goto notpending_test
endif
pending_test:
TEST: #SR 18
"If the workstation transformation update state is PENDING,
then the state of visual representation for that
workstation should be DEFERRED."
<inquire display update state> to determine
svr = state of visual representation
pass/fail depending on (svr = DEFERRED)
TEST: #SR 12 16
"If the workstation transformation update state returned by
<inquire workstation transformation 3> is PENDING,
then the current values of the workstation transformation
should be the same as they were before the requested
values were last set."
pass/fail depending on ( cuwin = ocwin and cuvwp = ocvwp )
notpending_test:
<update workstation> to force update of workstation transformation
<inquire display update state> to determine
svr = state of visual representation
if (svr = CORRECT) then
TEST: #SR 15 19
"If the state of visual representation for a workstation
is CORRECT, then the workstation transformation update
returned by <inquire workstation transformation>
state should be NOTPENDING."
<inquire workstation transformation> to determine
wtupd = workstation transformation update state
pass/fail depending on (wtupd = NOTPENDING)
else
message: skipping test that CORRECT implies NOTPENDING
endif
<inquire workstation transformation 3> to determine new
current state:
wtupd = workstation transformation update state
cuwin = new 3D window
cuvwp = new 3D viewport
if (wtupd not= NOTPENDING) then
message: skipping NOTPENDING test
goto end_notpending_test
endif
TEST: #SR 15 17
"If the workstation transformation update state returned by
<inquire workstation transformation 3> is NOTPENDING, then
the current values of the workstation transformation
should be the same as the most recently set requested
values."
pass/fail depending on ( cuwin = nwwin and cuvwp = nwvwp )
end_notpending_test:
END PROGRAM 3