3 -- Grant of Unlimited Rights
5 -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
6 -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
7 -- unlimited rights in the software and documentation contained herein.
8 -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
9 -- this public release, the Government intends to confer upon all
10 -- recipients unlimited rights equal to those held by the Government.
11 -- These rights include rights to use, duplicate, release or disclose the
12 -- released technical data and computer software in whole or in part, in
13 -- any manner and for any purpose whatsoever, and to have or permit others
18 -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
19 -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
20 -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
21 -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
22 -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
23 -- PARTICULAR PURPOSE OF SAID MATERIAL.
26 -- CHECK THAT 'PRED' AND 'SUCC' YIELD THE CORRECT RESULTS WHEN THE
27 -- PREFIX IS A FORMAL DISCRETE TYPE WHOSE ACTUAL PARAMETER IS A
31 -- RJW 03/24/86 CREATED ORIGINAL TEST.
32 -- DHH 10/19/87 SHORTENED LINES CONTAINING MORE THAN 72 CHARACTERS.
34 WITH REPORT
; USE REPORT
;
39 TEST
("C35508H", "CHECK THAT 'PRED' AND 'SUCC' YIELD THE " &
40 "CORRECT RESULTS WHEN THE PREFIX IS A " &
41 "FORMAL DISCRETE TYPE WHOSE ACTUAL PARAMETER " &
42 "IS A BOOLEAN TYPE" );
46 TYPE NEWBOOL
IS NEW BOOLEAN;
51 PROCEDURE P
(STR
: STRING);
53 PROCEDURE P
(STR
: STRING) IS
54 SUBTYPE SBOOL
IS BOOL
RANGE T
.. T
;
57 IF BOOL
'PRED (T
) /= F
THEN
58 FAILED
( "INCORRECT VALUE FOR " &
61 IF BOOL
'SUCC (F
) /= T
THEN
62 FAILED
( "INCORRECT VALUE FOR " &
68 IF SBOOL
'PRED (T
) /= F
THEN
69 FAILED
( "INCORRECT VALUE FOR SBOOL'PRED " &
75 IF SBOOL
'PRED (SBOOL
'BASE'FIRST) = T THEN
76 FAILED("'PRED
('FIRST) WRAPPED AROUND " &
77 "TO TRUE FOR " & STR);
79 FAILED ( "NO EXCEPTION RAISED FOR " &
80 STR & "'PRED
(SBOOL
'BASE'FIRST)" );
82 WHEN CONSTRAINT_ERROR =>
85 FAILED ( "WRONG EXCEPTION RAISED FOR " &
86 STR & "'PRED
(SBOOL
'BASE'FIRST)" );
90 IF SBOOL'SUCC (SBOOL'BASE'LAST
) = F
THEN
91 FAILED
("'SUCC('LAST) WRAPPED AROUND TO " &
94 FAILED
( "NO EXCEPTION RAISED FOR " & STR
&
95 "'SUCC (SBOOL'BASE'LAST)" );
97 WHEN CONSTRAINT_ERROR
=>
100 FAILED
( "WRONG EXCEPTION RAISED FOR " &
101 STR
& "'SUCC (SBOOL'BASE'LAST)" );
105 PROCEDURE NP1
IS NEW P
106 ( BOOL
=> BOOLEAN, F
=> FALSE, T
=> TRUE );
108 PROCEDURE NP2
IS NEW P
109 ( BOOL
=> NEWBOOL
, F
=> FALSE, T
=> TRUE );