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.
25 -- FOR DERIVED BOOLEAN TYPES:
27 -- CHECK THAT ALL VALUES OF THE PARENT (BASE) TYPE ARE PRESENT FOR THE
28 -- DERIVED (BASE) TYPE WHEN THE DERIVED TYPE DEFINITION IS
31 -- CHECK THAT ANY CONSTRAINT IMPOSED ON THE PARENT SUBTYPE IS ALSO
32 -- IMPOSED ON THE DERIVED SUBTYPE.
36 WITH REPORT
; USE REPORT
;
40 SUBTYPE PARENT
IS BOOLEAN;
42 TYPE T
IS NEW PARENT
RANGE
43 PARENT
'VAL (IDENT_INT
(PARENT
'POS (FALSE))) ..
44 PARENT
'VAL (IDENT_INT
(PARENT
'POS (FALSE)));
46 SUBTYPE SUBPARENT
IS PARENT
RANGE TRUE .. TRUE;
48 TYPE S
IS NEW SUBPARENT
;
54 TEST
("C34001F", "CHECK THAT ALL VALUES OF THE PARENT (BASE) " &
55 "TYPE ARE PRESENT FOR THE DERIVED (BASE) TYPE " &
56 "WHEN THE DERIVED TYPE DEFINITION IS " &
57 "CONSTRAINED. ALSO CHECK THAT ANY CONSTRAINT " &
58 "IMPOSED ON THE PARENT SUBTYPE IS ALSO IMPOSED " &
59 "ON THE DERIVED SUBTYPE. CHECK FOR DERIVED " &
62 -- CHECK THAT BASE TYPE VALUES NOT IN THE SUBTYPE ARE PRESENT.
64 IF T
'BASE'FIRST /= FALSE OR T'BASE'LAST
/= TRUE OR
65 S
'BASE'FIRST /= FALSE OR S'BASE'LAST
/= TRUE THEN
66 FAILED
("INCORRECT 'BASE'FIRST OR 'BASE'LAST");
69 IF T
'PRED (TRUE) /= FALSE OR T
'SUCC (FALSE) /= TRUE OR
70 S
'PRED (TRUE) /= FALSE OR S
'SUCC (FALSE) /= TRUE THEN
71 FAILED
("INCORRECT 'PRED OR 'SUCC");
74 -- CHECK THE DERIVED SUBTYPE CONSTRAINT.
76 IF T
'FIRST /= FALSE OR T
'LAST /= FALSE OR
77 S
'FIRST /= TRUE OR S
'LAST /= TRUE THEN
78 FAILED
("INCORRECT 'FIRST OR 'LAST");
84 IF NOT PARENT
(X
) /= PARENT
(Y
) THEN -- USE X AND Y.
85 FAILED
("INCORRECT CONVERSION TO PARENT");
89 FAILED
("EXCEPTION RAISED BY OK ASSIGNMENT");
94 FAILED
("CONSTRAINT_ERROR NOT RAISED -- X := TRUE");
95 IF X
= TRUE THEN -- USE X.
96 COMMENT
("X ALTERED -- X := TRUE");
99 WHEN CONSTRAINT_ERROR
=>
102 FAILED
("WRONG EXCEPTION RAISED -- X := TRUE");
107 FAILED
("CONSTRAINT_ERROR NOT RAISED -- Y := FALSE");
108 IF Y
= FALSE THEN -- USE Y.
109 COMMENT
("Y ALTERED -- Y := FALSE");
112 WHEN CONSTRAINT_ERROR
=>
115 FAILED
("WRONG EXCEPTION RAISED -- Y := FALSE");