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 CONSTRAINT_ERROR IS RAISED FOR A SUBTYPE INDICATION
27 -- OF A DISCRETE GENERIC FORMAL TYPE WHEN THE LOWER OR UPPER BOUND
28 -- OF A NON-NULL RANGE LIES OUTSIDE THE RANGE OF THE TYPE MARK.
31 -- JET 07/08/88 CREATED ORIGINAL TEST.
33 WITH REPORT
; USE REPORT
;
37 TYPE ENUM
IS (WE
, LOVE
, WRITING
, TESTS
);
38 TYPE INT
IS RANGE -10..10;
41 TYPE GEN_ENUM
IS (<>);
42 TYPE GEN_INT
IS RANGE <>;
44 SUBTYPE SUBENUM
IS GEN_ENUM
RANGE
45 GEN_ENUM
'SUCC(GEN_ENUM
'FIRST) ..
46 GEN_ENUM
'PRED(GEN_ENUM
'LAST);
47 SUBTYPE SUBINT
IS GEN_INT
RANGE
48 GEN_INT
'SUCC(GEN_INT
'FIRST) ..
49 GEN_INT
'PRED(GEN_INT
'LAST);
50 TYPE A1
IS ARRAY (0..GEN_INT
'LAST) OF INTEGER;
51 TYPE A2
IS ARRAY (GEN_INT
RANGE GEN_INT
'FIRST..0) OF INTEGER;
54 PACKAGE BODY GEN_PACK
IS
56 TEST
("C35003B", "CHECK THAT CONSTRAINT_ERROR IS RAISED " &
57 "FOR A SUBTYPE INDICATION OF A DISCRETE " &
58 "GENERIC FORMAL TYPE WHEN THE LOWER OR " &
59 "UPPER BOUND OF A NON-NULL RANGE LIES " &
60 "OUTSIDE THE RANGE OF THE TYPE MARK");
63 SUBTYPE SUBSUBENUM
IS SUBENUM
RANGE
64 GEN_ENUM
'FIRST..SUBENUM
'LAST;
66 FAILED
("NO EXCEPTION RAISED (E1)");
68 Z
: SUBSUBENUM
:= SUBENUM
'FIRST;
70 IF NOT EQUAL
(SUBSUBENUM
'POS(Z
),
71 SUBSUBENUM
'POS(Z
)) THEN
72 COMMENT
("DON'T OPTIMIZE Z");
77 FAILED
("EXCEPTION RAISED IN WRONG " &
81 WHEN CONSTRAINT_ERROR
=>
84 FAILED
("WRONG EXCEPTION RAISED (E1)");
89 TYPE A
IS ARRAY (SUBENUM
RANGE SUBENUM
'FIRST ..
90 GEN_ENUM
'LAST) OF INTEGER;
92 FAILED
("NO EXCEPTION RAISED (E2)");
94 Z
: A
:= (OTHERS => 0);
96 IF NOT EQUAL
(Z
(SUBENUM
'FIRST),
97 Z
(SUBENUM
'FIRST)) THEN
98 COMMENT
("DON'T OPTIMIZE Z");
103 FAILED
("EXCEPTION RAISED IN WRONG PLACE " &
107 WHEN CONSTRAINT_ERROR
=>
110 FAILED
("WRONG EXCEPTION RAISED (E2)");
115 TYPE I
IS ACCESS SUBINT
RANGE
116 GEN_INT
'FIRST..SUBINT
'LAST;
118 FAILED
("NO EXCEPTION RAISED (I1)");
120 Z
: I
:= NEW SUBINT
'(SUBINT'FIRST);
122 IF NOT EQUAL(INTEGER(Z.ALL),INTEGER(Z.ALL))
124 COMMENT ("DON'T OPTIMIZE Z");
129 FAILED ("EXCEPTION RAISED IN WRONG PLACE " &
133 WHEN CONSTRAINT_ERROR =>
136 FAILED ("WRONG EXCEPTION RAISED (I1)");
142 SUBINT RANGE SUBINT'FIRST..GEN_INT'LAST;
144 FAILED ("NO EXCEPTION RAISED (I2)");
148 IF NOT EQUAL(INTEGER(Z),INTEGER(Z)) THEN
149 COMMENT ("DON'T OPTIMIZE Z");
154 FAILED ("EXCEPTION RAISED IN WRONG PLACE " &
158 WHEN CONSTRAINT_ERROR =>
161 FAILED ("WRONG EXCEPTION RAISED (I2)");
166 SUBTYPE I IS SUBINT RANGE A1'RANGE;
168 FAILED ("NO EXCEPTION RAISED (R1)");
170 Z : I := SUBINT'FIRST;
172 IF NOT EQUAL(INTEGER(Z),INTEGER(Z)) THEN
173 COMMENT ("DON'T OPTIMIZE Z");
178 FAILED ("EXCEPTION RAISED IN WRONG PLACE " &
182 WHEN CONSTRAINT_ERROR =>
185 FAILED ("WRONG EXCEPTION RAISED (R1)");
190 SUBTYPE I IS SUBINT RANGE A2'RANGE;
192 FAILED ("NO EXCEPTION RAISED (R2)");
196 IF NOT EQUAL(INTEGER(Z),INTEGER(Z)) THEN
197 COMMENT ("DON'T OPTIMIZE Z");
202 FAILED ("EXCEPTION RAISED IN WRONG PLACE " &
206 WHEN CONSTRAINT_ERROR =>
209 FAILED ("WRONG EXCEPTION RAISED (R2)");
213 PACKAGE ENUM_PACK IS NEW GEN_PACK(ENUM, INT);