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 THE FOLLOWING IMPLICITLY DECLARED ENTITIES CAN BE SELECTED
26 -- FROM OUTSIDE THE PACKAGE USING AN EXPANDED NAME, FOR AN ARRAY TYPE.
27 -- CASE 1: CHECK EQUALITY AND INEQUALITY WHEN COMPONENT TYPE IS
28 -- NON-LIMITED, FOR MULTIDIMENSIONAL ARRAYS.
29 -- CASE 2: FOR ONE DIMENSIONAL ARRAYS:
30 -- A) CHECK CATENATION, EQUALITY, AND INEQUALITY WHEN
31 -- COMPONENT TYPE IS NON-LIMITED.
32 -- B) CHECK RELATIONAL OPERATORS WHEN COMPONENT TYPE IS
34 -- C) CHECK THE "NOT" OPERATOR AND THE LOGICAL OPERATORS
35 -- WHEN COMPONENT TYPE IS BOOLEAN.
39 WITH REPORT
; USE REPORT
;
43 TYPE CATARRAY
IS ARRAY (INTEGER RANGE <>) OF INTEGER;
45 TYPE ARRAY_1
IS ARRAY (1..10) OF INTEGER;
46 TYPE ARRAY_2
IS ARRAY (1..4, 1..4) OF INTEGER;
47 TYPE ARRAY_3
IS ARRAY (1..2, 1..3, 1..4) OF INTEGER;
48 TYPE ARRAY_4
IS ARRAY (1..10) OF BOOLEAN;
49 TYPE ARRAY_5
IS ARRAY (1..4, 1..4) OF BOOLEAN;
50 TYPE ARRAY_6
IS ARRAY (1..2, 1..3, 1..4) OF BOOLEAN;
52 OBJ_ARA_1
: ARRAY_1
:= (1..10 => IDENT_INT
(0));
53 OBJ_ARA_2
: ARRAY_2
:= (1..4 => (1..4 => IDENT_INT
(0)));
54 OBJ_ARA_3
: ARRAY_3
:= (1..2 => (1..3 =>
55 (1..4 => IDENT_INT
(0))));
56 OBJ_ARA_4
: ARRAY_4
:= (1..10 => IDENT_BOOL
(FALSE));
57 OBJ_ARA_5
: ARRAY_5
:= (1..4 => (1..4 => IDENT_BOOL
(FALSE)));
58 OBJ_ARA_6
: ARRAY_6
:= (1..2 => (1..3 =>
59 (1..4 => IDENT_BOOL
(FALSE))));
60 OBJ_ARA_7
: CATARRAY
(1..10) := (1..10 => IDENT_INT
(0));
61 OBJ_ARA_20
: CATARRAY
(1..20) := (1..10 => 1,
62 11..20 => IDENT_INT
(0));
65 VAR_ARA_1
: P
.ARRAY_1
:= (1..10 => IDENT_INT
(1));
66 VAR_ARA_2
: P
.ARRAY_2
:= (1..4 => (1..4 => IDENT_INT
(1)));
67 VAR_ARA_3
: P
.ARRAY_3
:= (1..2 => (1..3 =>
68 (1..4 => IDENT_INT
(1))));
69 VAR_ARA_4
: P
.ARRAY_4
:= (1..10 => IDENT_BOOL
(TRUE));
70 VAR_ARA_5
: P
.ARRAY_5
:= (1..4 => (1..4 => IDENT_BOOL
(TRUE)));
71 VAR_ARA_6
: P
.ARRAY_6
:= (1..2 => (1..3 =>
72 (1..4 => IDENT_BOOL
(TRUE))));
73 VAR_ARA_7
: P
.CATARRAY
(1..10) := (1..10 => IDENT_INT
(1));
74 VAR_ARA_8
: P
.ARRAY_4
:= (1..10 => IDENT_BOOL
(TRUE));
75 VAR_ARA_20
: P
.CATARRAY
(1..20) := (1..20 => IDENT_INT
(0));
78 TEST
("C41325A", "CHECK THAT IMPLICITLY DECLARED ENTITIES CAN " &
79 "BE SELECTED FROM OUTSIDE THE PACKAGE USING AN " &
80 "EXPANDED NAME, FOR AN ARRAY TYPE");
82 -- CASE 1: MULTIDIMENSIONAL ARRAYS.
84 IF P
."=" (VAR_ARA_2
, P
.OBJ_ARA_2
) THEN
85 FAILED
("INCORRECT RESULTS FROM EXPANDED NAME - 1");
88 IF P
."=" (VAR_ARA_5
, P
.OBJ_ARA_5
) THEN
89 FAILED
("INCORRECT RESULTS FROM EXPANDED NAME - 2");
92 IF P
."/=" (VAR_ARA_2
, P
.ARRAY_2
'(1..4 => (1..4 => 1))) THEN
93 FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 3");
96 IF P."/=" (VAR_ARA_5, P.ARRAY_5'(1..4 => (1..4 => TRUE))) THEN
97 FAILED
("INCORRECT RESULTS FROM EXPANDED NAME - 4");
100 IF P
."=" (VAR_ARA_3
, P
.OBJ_ARA_3
) THEN
101 FAILED
("INCORRECT RESULTS FROM EXPANDED NAME - 5");
104 IF P
."/=" (VAR_ARA_6
, P
.ARRAY_6
'(1..2 =>(1..3 =>(1..4 => TRUE))))
106 FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 6");
109 -- CASE 2: ONE DIMENSIONAL ARRAYS.
111 IF P."=" (VAR_ARA_1, P.OBJ_ARA_1) THEN
112 FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 7");
115 IF P."/=" (VAR_ARA_1, P.ARRAY_1'(1..10 => 1)) THEN
116 FAILED
("INCORRECT RESULTS FROM EXPANDED NAME - 8");
119 VAR_ARA_20
:= P
."&" (VAR_ARA_7
, P
.OBJ_ARA_7
);
120 IF P
."/=" (VAR_ARA_20
, P
.OBJ_ARA_20
) THEN
121 FAILED
("INCORRECT RESULTS FROM EXPANDED NAME - 9");
124 IF P
."<" (VAR_ARA_1
, P
.OBJ_ARA_1
) THEN
125 FAILED
("INCORRECT RESULTS FROM EXPANDED NAME - 10");
128 IF P
.">" (P
.OBJ_ARA_1
, VAR_ARA_1
) THEN
129 FAILED
("INCORRECT RESULTS FROM EXPANDED NAME - 11");
132 IF P
."<=" (VAR_ARA_1
, P
.OBJ_ARA_1
) THEN
133 FAILED
("INCORRECT RESULTS FROM EXPANDED NAME - 12");
136 IF P
."<=" (VAR_ARA_1
, P
.ARRAY_1
'(1..10 => 1)) THEN
139 FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 13");
142 IF P.">=" (VAR_ARA_1, P.ARRAY_1'(1..10 => 2)) THEN
143 FAILED
("INCORRECT RESULTS FROM EXPANDED NAME - 14");
146 IF P
.">=" (VAR_ARA_1
, P
.ARRAY_1
'(1..10 => 1)) THEN
149 FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 15");
152 VAR_ARA_8 := P."NOT" (VAR_ARA_4);
153 IF P."/=" (VAR_ARA_8, P.OBJ_ARA_4) THEN
154 FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 16");
157 VAR_ARA_8 := P."OR" (VAR_ARA_4, P.OBJ_ARA_4);
158 IF P."=" (VAR_ARA_8, P.OBJ_ARA_4) THEN
159 FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 17");
162 VAR_ARA_8 := P."AND" (VAR_ARA_4, P.OBJ_ARA_4);
163 IF P."/=" (VAR_ARA_8, P.OBJ_ARA_4) THEN
164 FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 18");
167 VAR_ARA_8 := P."XOR" (VAR_ARA_4, P.OBJ_ARA_4);
168 IF P."=" (VAR_ARA_8, P.OBJ_ARA_4) THEN
169 FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 19");