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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c4/] [c45262a.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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