OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c4/] [c41325a.ada] - Blame information for rev 149

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C41325A.ADA
2
 
3
--                             Grant of Unlimited Rights
4
--
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 
14
--     to do so.
15
--
16
--                                    DISCLAIMER
17
--
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.
24
--*
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 
33
--                    DISCRETE.
34
--               C) CHECK THE "NOT" OPERATOR AND THE LOGICAL OPERATORS 
35
--                    WHEN COMPONENT TYPE IS BOOLEAN.
36
 
37
-- TBN  7/17/86
38
 
39
WITH REPORT; USE REPORT;
40
PROCEDURE C41325A IS
41
 
42
     PACKAGE P IS
43
          TYPE CATARRAY IS ARRAY (INTEGER RANGE <>) OF INTEGER;
44
 
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;
51
 
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));
63
     END P;
64
 
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));
76
 
77
BEGIN
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");
81
 
82
     -- CASE 1: MULTIDIMENSIONAL ARRAYS.
83
 
84
     IF P."=" (VAR_ARA_2, P.OBJ_ARA_2) THEN
85
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 1");
86
     END IF;
87
 
88
     IF P."=" (VAR_ARA_5, P.OBJ_ARA_5) THEN
89
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 2");
90
     END IF;
91
 
92
     IF P."/=" (VAR_ARA_2, P.ARRAY_2'(1..4 => (1..4 => 1))) THEN
93
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 3");
94
     END IF;
95
 
96
     IF P."/=" (VAR_ARA_5, P.ARRAY_5'(1..4 => (1..4 => TRUE))) THEN
97
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 4");
98
     END IF;
99
 
100
     IF P."=" (VAR_ARA_3, P.OBJ_ARA_3) THEN
101
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 5");
102
     END IF;
103
 
104
     IF P."/=" (VAR_ARA_6, P.ARRAY_6'(1..2 =>(1..3 =>(1..4 => TRUE))))
105
          THEN
106
               FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 6");
107
     END IF;
108
 
109
     -- CASE 2: ONE DIMENSIONAL ARRAYS.
110
 
111
     IF P."=" (VAR_ARA_1, P.OBJ_ARA_1) THEN
112
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 7");
113
     END IF;
114
 
115
     IF P."/=" (VAR_ARA_1, P.ARRAY_1'(1..10 => 1)) THEN
116
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 8");
117
     END IF;
118
 
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");
122
     END IF;
123
 
124
     IF P."<" (VAR_ARA_1, P.OBJ_ARA_1) THEN
125
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 10");
126
     END IF;
127
 
128
     IF P.">" (P.OBJ_ARA_1, VAR_ARA_1) THEN
129
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 11");
130
     END IF;
131
 
132
     IF P."<=" (VAR_ARA_1, P.OBJ_ARA_1) THEN
133
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 12");
134
     END IF;
135
 
136
     IF P."<=" (VAR_ARA_1, P.ARRAY_1'(1..10 => 1)) THEN
137
          NULL;
138
     ELSE
139
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 13");
140
     END IF;
141
 
142
     IF P.">=" (VAR_ARA_1, P.ARRAY_1'(1..10 => 2)) THEN
143
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 14");
144
     END IF;
145
 
146
     IF P.">=" (VAR_ARA_1, P.ARRAY_1'(1..10 => 1)) THEN
147
          NULL;
148
     ELSE
149
          FAILED ("INCORRECT RESULTS FROM EXPANDED NAME - 15");
150
     END IF;
151
 
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");
155
     END IF;
156
 
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");
160
     END IF;
161
 
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");
165
     END IF;
166
 
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");
170
     END IF;
171
 
172
     RESULT;
173
END C41325A;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.