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 -- CHECK THAT CONSTRAINT_ERROR IS RAISED BY A DISCRIMINANT CONSTRAINT
26 -- IF A VALUE SPECIFIED FOR A DISCRIMINANT DOES NOT LIE IN THE RANGE
27 -- OF THE DISCRIMINANT. THIS TEST CONTAINS CHECKS FOR SUBTYPE
28 -- INDICATIONS WHERE THE TYPE MARK DENOTES A RECORD TYPE.
31 -- EDS 7/14/98 AVOID OPTIMIZATION
33 WITH REPORT
; USE REPORT
;
36 TYPE REC
(D
: POSITIVE) IS
42 TEST
( "C37211A", "CHECK THAT CONSTRAINT_ERROR IS RAISED BY " &
43 "A DISCRIMINANT CONSTRAINT IF A VALUE " &
44 "SPECIFIED FOR A DISCRIMINANT DOES NOT LIE " &
45 "IN THE RANGE OF THE DISCRIMINANT WHERE THE " &
46 "TYPE MARK DENOTES A RECORD TYPE" );
50 SUBTYPE SUBREC
IS REC
(IDENT_INT
(-1));
55 FAILED
( "NO EXCEPTION RAISED AT THE " &
56 "ELABORATION OF SUBTYPE SUBREC " & INTEGER'IMAGE(SR
.D
));
60 FAILED
( "EXCEPTION RAISED AT DECLARATION OF " &
65 WHEN CONSTRAINT_ERROR
=>
68 FAILED
( "WRONG EXCEPTION RAISED AT ELABORATION OF " &
74 TYPE ARR
IS ARRAY (1 .. 10) OF REC
(IDENT_INT
(-1));
79 FAILED
( "NO EXCEPTION RAISED AT THE " &
80 "ELABORATION OF TYPE ARR " & INTEGER'IMAGE(AR
(1).D
));
84 FAILED
( "EXCEPTION RAISED AT DECLARATION OF " &
89 WHEN CONSTRAINT_ERROR
=>
92 FAILED
( "WRONG EXCEPTION RAISED AT ELABORATION OF " &
100 X
: REC
(IDENT_INT
(-1));
107 FAILED
( "NO EXCEPTION RAISED AT THE " &
108 "ELABORATION OF TYPE REC1 " & INTEGER'IMAGE(R1
.X
.D
));
112 FAILED
( "EXCEPTION RAISED AT DECLARATION OF " &
117 WHEN CONSTRAINT_ERROR
=>
120 FAILED
( "WRONG EXCEPTION RAISED AT ELABORATION OF " &
126 TYPE ACCREC
IS ACCESS REC
(IDENT_INT
(-1));
131 FAILED
( "NO EXCEPTION RAISED AT THE " &
132 "ELABORATION OF TYPE ACCREC " & INTEGER'IMAGE(ACR
.D
));
136 FAILED
( "EXCEPTION RAISED AT DECLARATION OF " &
141 WHEN CONSTRAINT_ERROR
=>
144 FAILED
( "WRONG EXCEPTION RAISED AT ELABORATION OF " &
150 TYPE NEWREC
IS NEW REC
(IDENT_INT
(-1));
155 FAILED
( "NO EXCEPTION RAISED AT THE " &
156 "ELABORATION OF TYPE NEWREC " & INTEGER'IMAGE(NR
.D
));
160 FAILED
( "EXCEPTION RAISED AT DECLARATION OF " &
165 WHEN CONSTRAINT_ERROR
=>
168 FAILED
( "WRONG EXCEPTION RAISED AT ELABORATION OF " &
174 R
: REC
(IDENT_INT
(-1));
176 FAILED
( "NO EXCEPTION RAISED AT THE DECLARATION OF " &
177 "R " & INTEGER'IMAGE(R
.D
));
180 FAILED
( "EXCEPTION RAISED INSIDE BLOCK " &
185 WHEN CONSTRAINT_ERROR
=>
188 FAILED
( "WRONG EXCEPTION RAISED AT DECLARATION OF " &
194 TYPE REC_NAME
IS ACCESS REC
;
197 RN
: REC_NAME
:= NEW REC
(IDENT_INT
(-1));
199 FAILED
( "NO EXCEPTION RAISED AT THE " &
200 "DECLARATION OF OBJECT RN " & INTEGER'IMAGE(RN
.D
));
203 WHEN CONSTRAINT_ERROR
=>
206 FAILED
( "WRONG EXCEPTION RAISED AT DECLARATION " &
211 FAILED
( "EXCEPTION RAISED AT ELABORATION OF TYPE " &
217 TYPE BAD_REC
(D
: POSITIVE := IDENT_INT
(-1)) IS
225 FAILED
( "NO EXCEPTION RAISED AT THE " &
226 "DECLARATION OF OBJECT BR " & INTEGER'IMAGE(BR
.D
));
229 WHEN CONSTRAINT_ERROR
=>
232 FAILED
( "WRONG EXCEPTION RAISED AT DECLARATION " &
237 FAILED
( "EXCEPTION RAISED AT ELABORATION OF TYPE " &