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/] [c45262c.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C45262C.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 ORDERING COMPARISONS YIELD CORRECT RESULTS FOR
26
-- ONE-DIMENSIONAL DISCRETE ARRAY TYPES.  THIS TEST CHECKS ARRAYS OF
27
-- AN ENUMERATION TYPE.
28
 
29
-- JWC 8/19/85
30
-- JRK 6/24/86   FIXED SPELLING IN FAILURE MESSAGE.
31
 
32
WITH REPORT; USE REPORT;
33
 
34
PROCEDURE C45262C IS
35
BEGIN
36
     TEST ("C45262C", "ORDERING COMPARISONS OF ONE-DIMENSIONAL " &
37
                      "DISCRETE ARRAY TYPES - ENUMERATED COMPONENTS");
38
 
39
     DECLARE
40
 
41
          SUBTYPE SUBINT IS INTEGER RANGE 0 .. 5;
42
          TYPE ENUM IS (E0, E1);
43
          TYPE ARR IS ARRAY( SUBINT RANGE <> ) OF ENUM;
44
          ARR1 : ARR(1 .. IDENT_INT(0));
45
          ARR2 : ARR(2 .. IDENT_INT(0));
46
          ARR3 : ARR(1 .. IDENT_INT(1)) := (IDENT_INT(1) => E0);
47
          ARR4 : ARR(0 .. IDENT_INT(0)) := (IDENT_INT(0) => E0);
48
          ARR5 : ARR(0 .. IDENT_INT(0)) := (IDENT_INT(0) => E1);
49
          ARR6 : ARR(1 .. IDENT_INT(5)) := (1 .. IDENT_INT(5) => E0);
50
          ARR7 : ARR(0 .. 4) := (0 .. 3 => E0, 4 => E1);
51
          ARR8 : ARR(0 .. IDENT_INT(4)) := (0 .. IDENT_INT(4) => E0);
52
          ARR9 : ARR(0 .. IDENT_INT(3)) := (0 .. IDENT_INT(3) => E0);
53
          ARRA : ARR(0 .. IDENT_INT(3)) := (0 .. IDENT_INT(3) => E1);
54
 
55
     BEGIN
56
          IF ARR1 < ARR2 THEN
57
               FAILED ("NULL ARRAYS ARR1 AND ARR2 NOT EQUAL - <");
58
          END IF;
59
 
60
          IF NOT (ARR1 <= ARR2) THEN
61
               FAILED ("NULL ARRAYS ARR1 AND ARR2 NOT EQUAL - <=");
62
          END IF;
63
 
64
          IF ARR1 > ARR2 THEN
65
               FAILED ("NULL ARRAYS ARR1 AND ARR2 NOT EQUAL - >");
66
          END IF;
67
 
68
          IF NOT ( ">=" (ARR1, ARR2) ) THEN
69
               FAILED ("NULL ARRAYS ARR1 AND ARR2 NOT EQUAL - >=");
70
          END IF;
71
 
72
          IF ARR3 < ARR1 THEN
73
               FAILED ("NON-NULL ARRAY ARR3 LESS THAN NULL ARR1");
74
          END IF;
75
 
76
          IF ARR3 <= ARR1 THEN
77
               FAILED ("NON-NULL ARRAY ARR3 LESS THAN EQUAL NULL ARR1");
78
          END IF;
79
 
80
          IF NOT ( ">" (ARR3, ARR1) ) THEN
81
               FAILED ("NON-NULL ARRAY ARR3 NOT GREATER THAN NULL " &
82
                       "ARR1");
83
          END IF;
84
 
85
          IF NOT (ARR3 >= ARR1) THEN
86
               FAILED ("NON-NULL ARRAY ARR3 NOT GREATER THAN EQUAL " &
87
                       "NULL ARR1");
88
          END IF;
89
 
90
          IF ARR3 < ARR4 THEN
91
               FAILED ("DIFFERENT BOUNDS, SAME NUMBER OF COMPONENTS, " &
92
                       "COMPONENTS EQUAL - <");
93
          END IF;
94
 
95
          IF NOT ( "<=" (ARR3, ARR4) ) THEN
96
               FAILED ("DIFFERENT BOUNDS, SAME NUMBER OF COMPONENTS, " &
97
                       "COMPONENTS EQUAL - <=");
98
          END IF;
99
 
100
          IF ARR3 > ARR4 THEN
101
               FAILED ("DIFFERENT BOUNDS, SAME NUMBER OF COMPONENTS, " &
102
                       "COMPONENTS EQUAL - >");
103
          END IF;
104
 
105
          IF NOT (ARR3 >= ARR4) THEN
106
               FAILED ("DIFFERENT BOUNDS, SAME NUMBER OF COMPONENTS, " &
107
                       "COMPONENTS EQUAL - >=");
108
          END IF;
109
 
110
          IF NOT ( "<" (ARR3, ARR5) ) THEN
111
               FAILED ("DIFFERENT BOUNDS, SAME NUMBER OF COMPONENTS, " &
112
                       "COMPONENTS NOT EQUAL - <");
113
          END IF;
114
 
115
          IF NOT (ARR3 <= ARR5) THEN
116
               FAILED ("DIFFERENT BOUNDS, SAME NUMBER OF COMPONENTS, " &
117
                       "COMPONENTS NOT EQUAL - <=");
118
          END IF;
119
 
120
          IF ARR3 > ARR5 THEN
121
               FAILED ("DIFFERENT BOUNDS, SAME NUMBER OF COMPONENTS, " &
122
                       "COMPONENTS NOT EQUAL - >");
123
          END IF;
124
 
125
          IF ARR3 >= ARR5 THEN
126
               FAILED ("DIFFERENT BOUNDS, SAME NUMBER OF COMPONENTS, " &
127
                       "COMPONENTS NOT EQUAL - >=");
128
          END IF;
129
 
130
          IF NOT (ARR6 < ARR7) THEN
131
               FAILED ("DIFFERENT BOUNDS, SAME NUMBER OF COMPONENTS, " &
132
                       "MULTIPLE COMPONENTS, COMPONENTS NOT EQUAL - <");
133
          END IF;
134
 
135
          IF NOT (ARR6 <= ARR7) THEN
136
               FAILED ("DIFFERENT BOUNDS, SAME NUMBER OF COMPONENTS, " &
137
                       "MULTIPLE COMPONENTS, COMPONENTS NOT EQUAL - " &
138
                       "<=");
139
          END IF;
140
 
141
          IF ARR6 > ARR7 THEN
142
               FAILED ("DIFFERENT BOUNDS, SAME NUMBER OF COMPONENTS, " &
143
                       "MULTIPLE COMPONENTS, COMPONENTS NOT EQUAL - >");
144
          END IF;
145
 
146
          IF ">=" (LEFT => ARR6, RIGHT => ARR7) THEN
147
               FAILED ("DIFFERENT BOUNDS, SAME NUMBER OF COMPONENTS, " &
148
                       "MULTIPLE COMPONENTS, COMPONENTS NOT EQUAL - " &
149
                       ">=");
150
          END IF;
151
 
152
          IF ARR6 < ARR8 THEN
153
               FAILED ("DIFFERENT BOUNDS, SAME NUMBER OF COMPONENTS, " &
154
                       "MULTIPLE COMPONENTS, COMPONENTS EQUAL - <");
155
          END IF;
156
 
157
          IF NOT (ARR6 <= ARR8) THEN
158
               FAILED ("DIFFERENT BOUNDS, SAME NUMBER OF COMPONENTS, " &
159
                       "MULTIPLE COMPONENTS, COMPONENTS EQUAL - <=");
160
          END IF;
161
 
162
          IF ">" (RIGHT => ARR8, LEFT => ARR6) THEN
163
               FAILED ("DIFFERENT BOUNDS, SAME NUMBER OF COMPONENTS, " &
164
                       "MULTIPLE COMPONENTS, COMPONENTS EQUAL - >");
165
          END IF;
166
 
167
          IF NOT (ARR6 >= ARR8) THEN
168
               FAILED ("DIFFERENT BOUNDS, SAME NUMBER OF COMPONENTS, " &
169
                       "MULTIPLE COMPONENTS, COMPONENTS EQUAL - >=");
170
          END IF;
171
 
172
          IF ARR8 < ARR9 THEN
173
               FAILED ("DIFFERENT NUMBER OF COMPONENTS, " &
174
                       "COMPONENTS EQUAL - <");
175
          END IF;
176
 
177
          IF ARR8 <= ARR9 THEN
178
               FAILED ("DIFFERENT NUMBER OF COMPONENTS, " &
179
                       "COMPONENTS EQUAL - <=");
180
          END IF;
181
 
182
          IF NOT (ARR8 > ARR9) THEN
183
               FAILED ("DIFFERENT NUMBER OF COMPONENTS, " &
184
                       "COMPONENTS EQUAL - >");
185
          END IF;
186
 
187
          IF NOT (ARR8 >= ARR9) THEN
188
               FAILED ("DIFFERENT NUMBER OF COMPONENTS, " &
189
                       "COMPONENTS EQUAL - >=");
190
          END IF;
191
 
192
          IF NOT (ARR8 < ARRA) THEN
193
               FAILED ("DIFFERENT NUMBER OF COMPONENTS, " &
194
                       "COMPONENTS NOT EQUAL - <");
195
          END IF;
196
 
197
          IF NOT (ARR8 <= ARRA) THEN
198
               FAILED ("DIFFERENT NUMBER OF COMPONENTS, " &
199
                       "COMPONENTS NOT EQUAL - <=");
200
          END IF;
201
 
202
          IF ARR8 > ARRA THEN
203
               FAILED ("DIFFERENT NUMBER OF COMPONENTS, " &
204
                       "COMPONENTS NOT EQUAL - >");
205
          END IF;
206
 
207
          IF ARR8 >= ARRA THEN
208
               FAILED ("DIFFERENT NUMBER OF COMPONENTS, " &
209
                       "COMPONENTS NOT EQUAL - >=");
210
          END IF;
211
 
212
     END;
213
 
214
     RESULT;
215
 
216
END C45262C;

powered by: WebSVN 2.1.0

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