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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CC1224A.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
-- OBJECTIVE:
26
--     FOR ARRAY TYPES WITH A NONLIMITED COMPONENT TYPE (OF A FORMAL
27
--     AND NONFORMAL GENERIC TYPE), CHECK THAT THE FOLLOWING OPERATIONS
28
--     ARE IMPLICITY DECLARED AND ARE, THEREFORE, AVAILABLE WITHIN THE
29
--     GENERIC UNIT: ASSIGNMENT, THE OPERATION ASSOCIATED WITH
30
--     AGGREGATE NOTATION, MEMBERSHIP TESTS, THE OPERATION ASSOCIATED
31
--     WITH INDEXED COMPONENTS, QUALIFICATION, EXPLICIT CONVERSION,
32
--     'SIZE, 'ADDRESS, 'FIRST, 'FIRST (N), 'LAST, 'LAST (N),
33
--     'RANGE, 'RANGE (N), 'LENGTH, 'LENGTH (N).
34
 
35
-- HISTORY:
36
--     R.WILLIAMS  10/6/86
37
--     EDWARD V. BERARD  8/10/90  ADDED CHECKS FOR MULTI-DIMENSIONAL
38
--                                ARRAYS
39
--     LDC  10/10/90  CHANGED DECLARATIONS OF AD1 - AD6 TO PROCEDURE
40
--                    CALLS OF FA1 - FA6 TO ADDRESS_CHECK AS SUGGESTED
41
--                    BY THE CRG. 
42
--     PWN  01/31/95  REMOVED INCONSISTENCIES WITH ADA 9X.
43
 
44
WITH SYSTEM ;
45
WITH REPORT ;
46
 
47
PROCEDURE CC1224A IS
48
 
49
     SHORT_START : CONSTANT := -10 ;
50
     SHORT_END   : CONSTANT := 10 ;
51
 
52
     TYPE SHORT_RANGE IS RANGE SHORT_START .. SHORT_END ;
53
     SHORT_LENGTH : CONSTANT NATURAL := (SHORT_END - SHORT_START + 1) ;
54
 
55
     MEDIUM_START    : CONSTANT := 1 ;
56
     MEDIUM_END      : CONSTANT := 15 ;
57
 
58
     TYPE MEDIUM_RANGE IS RANGE MEDIUM_START .. MEDIUM_END ;
59
     MEDIUM_LENGTH   : CONSTANT NATURAL :=
60
                                (MEDIUM_END - MEDIUM_START + 1) ;
61
 
62
     TYPE MONTH_TYPE IS (JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG,
63
                         SEP, OCT, NOV, DEC) ;
64
     TYPE DAY_TYPE IS RANGE 1 .. 31 ;
65
     TYPE YEAR_TYPE IS RANGE 1904 .. 2050 ;
66
     TYPE DATE IS RECORD
67
          MONTH : MONTH_TYPE ;
68
          DAY   : DAY_TYPE ;
69
          YEAR  : YEAR_TYPE ;
70
     END RECORD ;
71
 
72
     TODAY : DATE := (AUG, 10, 1990) ;
73
 
74
     TYPE FIRST_TEMPLATE IS ARRAY (SHORT_RANGE RANGE <>,
75
                                   MEDIUM_RANGE RANGE <>) OF DATE ;
76
 
77
     TYPE SECOND_TEMPLATE IS ARRAY (SHORT_RANGE, MEDIUM_RANGE)
78
                                   OF DATE ;
79
 
80
     FIRST_ARRAY     : FIRST_TEMPLATE (-10 .. 10, 6 .. 10) ;
81
     SECOND_ARRAY    : FIRST_TEMPLATE (0 .. 7, 1 .. 15) ;
82
     THIRD_ARRAY     : SECOND_TEMPLATE ;
83
     FOURTH_ARRAY    : SECOND_TEMPLATE ;
84
 
85
     SUBTYPE SUBINT IS INTEGER RANGE REPORT.IDENT_INT (1) ..
86
                                     REPORT.IDENT_INT (6);
87
 
88
     TYPE ARRA IS ARRAY (SUBINT) OF SUBINT;
89
     A1 : ARRA := (REPORT.IDENT_INT (1) .. REPORT.IDENT_INT (6) => 1);
90
     A2 : ARRA := (A1'RANGE => 2);
91
 
92
     TYPE ARRB IS ARRAY (SUBINT RANGE <>) OF DATE ;
93
     A3 : ARRB (1 .. 6) :=
94
               (REPORT.IDENT_INT (1) .. REPORT.IDENT_INT (6) => TODAY);
95
 
96
     TYPE ARRC IS ARRAY (SUBINT RANGE <>, SUBINT RANGE <>) OF SUBINT;
97
     A4 : CONSTANT ARRC := (1 .. 6 => (1 .. 6 => 4));
98
 
99
     TYPE ARRD IS ARRAY (SUBINT, SUBINT) OF SUBINT;
100
     A5 : ARRD := (A4'RANGE (1) => (A4'RANGE (2) => 5));
101
 
102
     TYPE ARRE IS ARRAY (SUBINT) OF DATE ;
103
     A6 : ARRE := (A1'RANGE => TODAY);
104
 
105
     FUNCTION "=" (LEFT  : IN SYSTEM.ADDRESS ;
106
                   RIGHT : IN SYSTEM.ADDRESS ) RETURN BOOLEAN
107
              RENAMES SYSTEM."=" ;
108
 
109
     GENERIC
110
 
111
          TYPE T1 IS (<>);
112
          TYPE T2 IS PRIVATE;
113
          X2 : T2;
114
 
115
          TYPE FARR1 IS ARRAY (SUBINT) OF T1;
116
          FA1 : FARR1;
117
 
118
          TYPE FARR2 IS ARRAY (SUBINT) OF SUBINT;
119
          FA2 : FARR2;
120
 
121
          TYPE FARR3 IS ARRAY (SUBINT RANGE <>) OF T2;
122
          FA3 : FARR3;
123
 
124
          TYPE FARR4 IS ARRAY (SUBINT RANGE <>, SUBINT RANGE <>) OF T1;
125
          FA4 : FARR4;
126
 
127
          TYPE FARR5 IS ARRAY (SUBINT, SUBINT) OF SUBINT;
128
          FA5 : FARR5;
129
 
130
          TYPE FARR6 IS ARRAY (T1) OF T2;
131
          FA6 : FARR6;
132
 
133
          TYPE FARR7 IS ARRAY (T1) OF T2;
134
          FA7 : FARR7;
135
 
136
     PROCEDURE P ;
137
 
138
     GENERIC
139
 
140
          TYPE FIRST_INDEX IS (<>) ;
141
          TYPE SECOND_INDEX IS (<>) ;
142
          TYPE UNCONSTRAINED_ARRAY IS ARRAY
143
               (FIRST_INDEX RANGE <>, SECOND_INDEX RANGE <>) OF DATE ;
144
 
145
     PROCEDURE TEST_PROCEDURE (FIRST        : IN UNCONSTRAINED_ARRAY ;
146
                               FFIFS        : IN FIRST_INDEX ;
147
                               FFILS        : IN FIRST_INDEX ;
148
                               FSIFS        : IN SECOND_INDEX ;
149
                               FSILS        : IN SECOND_INDEX ;
150
                               FFLEN        : IN NATURAL ;
151
                               FSLEN        : IN NATURAL ;
152
                               FFIRT        : IN FIRST_INDEX ;
153
                               FSIRT        : IN SECOND_INDEX ;
154
                               SECOND       : IN UNCONSTRAINED_ARRAY ;
155
                               SFIFS        : IN FIRST_INDEX ;
156
                               SFILS        : IN FIRST_INDEX ;
157
                               SSIFS        : IN SECOND_INDEX ;
158
                               SSILS        : IN SECOND_INDEX ;
159
                               SFLEN        : IN NATURAL ;
160
                               SSLEN        : IN NATURAL ;
161
                               SFIRT        : IN FIRST_INDEX ;
162
                               SSIRT        : IN SECOND_INDEX ;
163
                               REMARKS      : IN STRING) ;
164
     GENERIC
165
 
166
          TYPE FIRST_INDEX IS (<>) ;
167
          TYPE SECOND_INDEX IS (<>) ;
168
          TYPE COMPONENT_TYPE IS PRIVATE ;
169
          TYPE CONSTRAINED_ARRAY IS ARRAY
170
               (FIRST_INDEX,SECOND_INDEX) OF COMPONENT_TYPE ;
171
 
172
     PROCEDURE CTEST_PROCEDURE (FIRST        : IN CONSTRAINED_ARRAY ;
173
                                FFIRT        : IN FIRST_INDEX ;
174
                                FSIRT        : IN SECOND_INDEX ;
175
                                SECOND       : IN CONSTRAINED_ARRAY ;
176
                                SFIRT        : IN FIRST_INDEX ;
177
                                SSIRT        : IN SECOND_INDEX ;
178
                                REMARKS      : IN STRING) ;
179
 
180
 
181
     PROCEDURE P IS
182
 
183
          IN1 : INTEGER := FA1'SIZE;
184
          IN2 : INTEGER := FA2'SIZE;
185
          IN3 : INTEGER := FA3'SIZE;
186
          IN4 : INTEGER := FA4'SIZE;
187
          IN5 : INTEGER := FA5'SIZE;
188
          IN6 : INTEGER := FA6'SIZE;
189
 
190
          B1 : FARR1;
191
 
192
          B2 : FARR2;
193
 
194
          SUBTYPE SARR3 IS FARR3 (FA3'RANGE);
195
          B3 : SARR3;
196
 
197
          SUBTYPE SARR4 IS FARR4 (FA4'RANGE (1), FA4'RANGE (2));
198
          B4 : SARR4;
199
 
200
          B5 : FARR5;
201
 
202
          B6 : FARR6 ;
203
 
204
          PROCEDURE ADDRESS_CHECK(ADDRESS : SYSTEM.ADDRESS) IS
205
 
206
          BEGIN
207
               IF REPORT.EQUAL(1, REPORT.IDENT_INT(2)) THEN
208
                    REPORT.COMMENT("DON'T OPTIMIZE OUT ADDRESS_CHECK");
209
               END IF;
210
          END ADDRESS_CHECK;
211
 
212
     BEGIN  -- P
213
 
214
          ADDRESS_CHECK(FA1'ADDRESS);
215
          ADDRESS_CHECK(FA2'ADDRESS);
216
          ADDRESS_CHECK(FA3'ADDRESS);
217
          ADDRESS_CHECK(FA4'ADDRESS);
218
          ADDRESS_CHECK(FA5'ADDRESS);
219
          ADDRESS_CHECK(FA6'ADDRESS);
220
 
221
          B1 := FA1;
222
 
223
          IF B1 /= FARR1 (FA1) THEN
224
               REPORT.FAILED ("INCORRECT RESULTS - 1" );
225
          END IF;
226
 
227
          B2 := FA2;
228
 
229
          IF B2 /= FARR2 (A2) THEN
230
               REPORT.FAILED ("INCORRECT RESULTS - 2" );
231
          END IF;
232
 
233
          B3 := FA3;
234
 
235
          IF B3 /= FARR3 (FA3) THEN
236
               REPORT.FAILED ("INCORRECT RESULTS - 3" );
237
          END IF;
238
 
239
          B4 := FA4;
240
 
241
          IF B4 /= FARR4 (FA4) THEN
242
               REPORT.FAILED ("INCORRECT RESULTS - 4" );
243
          END IF;
244
 
245
          B5 := FA5;
246
 
247
          IF B5 /= FARR5 (A5) THEN
248
               REPORT.FAILED ("INCORRECT RESULTS - 5" );
249
          END IF;
250
 
251
          B6 := FA6;
252
 
253
          IF B6 /= FARR6 (FA6) THEN
254
               REPORT.FAILED ("INCORRECT RESULTS - 6" );
255
          END IF;
256
 
257
          IF FA7 /= FARR7 (FA6) THEN
258
               REPORT.FAILED ("INCORRECT RESULTS - 7" );
259
          END IF;
260
 
261
          B1 := FARR1'(FA1'RANGE => T1'VAL (1));
262
 
263
          IF B1 (1) /= FA1 (1) THEN
264
               REPORT.FAILED ("INCORRECT RESULTS - 8" );
265
          END IF;
266
 
267
          B1 := FARR1'(1 => T1'VAL (1), 2 => T1'VAL (1),
268
                       3 .. 6 => T1'VAL (2));
269
 
270
          IF B1 (1) /= FA1 (1) THEN
271
               REPORT.FAILED ("INCORRECT RESULTS - 9" );
272
          END IF;
273
 
274
          B2 := FARR2'(FA2'RANGE => 2);
275
 
276
          IF B2 (2) /= FA2 (2) THEN
277
               REPORT.FAILED ("INCORRECT RESULTS - 10" );
278
          END IF;
279
 
280
          B3 := FARR3'(1|2|3 => X2, 4|5|6 => X2);
281
 
282
          IF B3 (3) /= FA3 (3) THEN
283
               REPORT.FAILED ("INCORRECT RESULTS - 11" );
284
          END IF;
285
 
286
          B4 := FARR4'(FA5'RANGE (1) => (FA5'RANGE (2) => T1'VAL (4)));
287
 
288
          IF B4 (4, 4) /= FA4 (4, 4) THEN
289
               REPORT.FAILED ("INCORRECT RESULTS - 12" );
290
          END IF;
291
 
292
          B5 := FARR5'(REPORT.IDENT_INT (1) ..
293
                       REPORT.IDENT_INT (6) =>  (1 .. 6 => 5));
294
 
295
          IF B5 (5, 5) /= FA5 (5, 5) THEN
296
               REPORT.FAILED ("INCORRECT RESULTS - 13" );
297
          END IF;
298
 
299
          B6 := FARR6'(FA6'RANGE => X2);
300
 
301
          IF B6 (T1'FIRST) /= FA6 (T1'FIRST) THEN
302
               REPORT.FAILED ("INCORRECT RESULTS - 14" );
303
          END IF;
304
 
305
          IF B1 NOT IN FARR1 THEN
306
               REPORT.FAILED ("INCORRECT RESULTS - 15" );
307
          END IF;
308
 
309
          IF FA2 NOT IN FARR2 THEN
310
               REPORT.FAILED ("INCORRECT RESULTS - 16" );
311
          END IF;
312
 
313
          IF FA3 NOT IN FARR3 THEN
314
               REPORT.FAILED ("INCORRECT RESULTS - 17" );
315
          END IF;
316
 
317
          IF B4 NOT IN FARR4 THEN
318
               REPORT.FAILED ("INCORRECT RESULTS - 18" );
319
          END IF;
320
 
321
          IF B5 NOT IN FARR5 THEN
322
               REPORT.FAILED ("INCORRECT RESULTS - 19" );
323
          END IF;
324
 
325
          IF FA6 NOT IN FARR6 THEN
326
               REPORT.FAILED ("INCORRECT RESULTS - 20" );
327
          END IF;
328
 
329
          IF FA1'LENGTH /= FA1'LAST - FA1'FIRST + 1 THEN
330
               REPORT.FAILED ("INCORRECT RESULTS - 27" );
331
          END IF;
332
 
333
          IF FA2'LENGTH /= FA2'LAST - FA2'FIRST + 1 THEN
334
               REPORT.FAILED ("INCORRECT RESULTS - 28" );
335
          END IF;
336
 
337
          IF FA3'LENGTH /= FA3'LAST - FA3'FIRST + 1 THEN
338
               REPORT.FAILED ("INCORRECT RESULTS - 29" );
339
          END IF;
340
 
341
          IF FA4'LENGTH /= FA4'LAST - FA4'FIRST + 1 THEN
342
               REPORT.FAILED ("INCORRECT RESULTS - 30" );
343
          END IF;
344
 
345
          IF FA4'LENGTH (2) /= FA4'LAST (2) - FA4'FIRST (2) + 1 THEN
346
               REPORT.FAILED ("INCORRECT RESULTS - 31" );
347
          END IF;
348
 
349
          IF FA5'LENGTH /= FA5'LAST - FA5'FIRST + 1 THEN
350
               REPORT.FAILED ("INCORRECT RESULTS - 32" );
351
          END IF;
352
 
353
          IF FA5'LENGTH (2) /= FA5'LAST (2) - FA5'FIRST (2) + 1 THEN
354
               REPORT.FAILED ("INCORRECT RESULTS - 33" );
355
          END IF;
356
 
357
          IF FA6'LENGTH /= T1'POS (FA6'LAST) -
358
             T1'POS (FA6'FIRST) + 1 THEN
359
               REPORT.FAILED ("INCORRECT RESULTS - 34" );
360
          END IF;
361
 
362
     END P ;
363
 
364
     PROCEDURE TEST_PROCEDURE (FIRST        : IN UNCONSTRAINED_ARRAY ;
365
                               FFIFS        : IN FIRST_INDEX ;
366
                               FFILS        : IN FIRST_INDEX ;
367
                               FSIFS        : IN SECOND_INDEX ;
368
                               FSILS        : IN SECOND_INDEX ;
369
                               FFLEN        : IN NATURAL ;
370
                               FSLEN        : IN NATURAL ;
371
                               FFIRT        : IN FIRST_INDEX ;
372
                               FSIRT        : IN SECOND_INDEX ;
373
                               SECOND       : IN UNCONSTRAINED_ARRAY ;
374
                               SFIFS        : IN FIRST_INDEX ;
375
                               SFILS        : IN FIRST_INDEX ;
376
                               SSIFS        : IN SECOND_INDEX ;
377
                               SSILS        : IN SECOND_INDEX ;
378
                               SFLEN        : IN NATURAL ;
379
                               SSLEN        : IN NATURAL ;
380
                               SFIRT        : IN FIRST_INDEX ;
381
                               SSIRT        : IN SECOND_INDEX ;
382
                               REMARKS      : IN STRING) IS
383
 
384
     BEGIN -- TEST_PROCEDURE
385
 
386
          IF (FIRST'FIRST /= FFIFS) OR
387
             (FIRST'FIRST (1) /= FFIFS) OR
388
             (FIRST'FIRST (2) /= FSIFS) OR
389
             (SECOND'FIRST /= SFIFS) OR
390
             (SECOND'FIRST (1) /= SFIFS) OR
391
             (SECOND'FIRST (2) /= SSIFS) THEN
392
               REPORT.FAILED ("PROBLEMS WITH 'FIRST. " & REMARKS) ;
393
          END IF ;
394
 
395
          IF (FIRST'LAST /= FFILS) OR
396
             (FIRST'LAST (1) /= FFILS) OR
397
             (FIRST'LAST (2) /= FSILS) OR
398
             (SECOND'LAST /= SFILS) OR
399
             (SECOND'LAST (1) /= SFILS) OR
400
             (SECOND'LAST (2) /= SSILS) THEN
401
               REPORT.FAILED ("PROBLEMS WITH 'LAST. " & REMARKS) ;
402
          END IF ;
403
 
404
          IF (FIRST'LENGTH /= FFLEN) OR
405
             (FIRST'LENGTH (1) /= FFLEN) OR
406
             (FIRST'LENGTH (2) /= FSLEN) OR
407
             (SECOND'LENGTH /= SFLEN) OR
408
             (SECOND'LENGTH (1) /= SFLEN) OR
409
             (SECOND'LENGTH (2) /= SSLEN) THEN
410
               REPORT.FAILED ("PROBLEMS WITH 'LENGTH. " & REMARKS) ;
411
          END IF ;
412
 
413
          IF (FFIRT NOT IN FIRST'RANGE (1)) OR
414
             (FFIRT NOT IN FIRST'RANGE) OR
415
             (SFIRT NOT IN SECOND'RANGE (1)) OR
416
             (SFIRT NOT IN SECOND'RANGE) OR
417
             (FSIRT NOT IN FIRST'RANGE (2)) OR
418
             (SSIRT NOT IN SECOND'RANGE (2)) THEN
419
               REPORT.FAILED ("INCORRECT HANDLING OF 'RANGE ATTRIBUE. " &
420
                              REMARKS) ;
421
          END IF ;
422
 
423
     END TEST_PROCEDURE ;
424
 
425
     PROCEDURE CTEST_PROCEDURE (FIRST        : IN CONSTRAINED_ARRAY ;
426
                                FFIRT        : IN FIRST_INDEX ;
427
                                FSIRT        : IN SECOND_INDEX ;
428
                                SECOND       : IN CONSTRAINED_ARRAY ;
429
                                SFIRT        : IN FIRST_INDEX ;
430
                                SSIRT        : IN SECOND_INDEX ;
431
                                REMARKS      : IN STRING) IS
432
 
433
     BEGIN -- CTEST_PROCEDURE
434
 
435
          IF (FIRST'FIRST /= FIRST_INDEX'FIRST) OR
436
             (FIRST'FIRST (1) /= FIRST_INDEX'FIRST) OR
437
             (FIRST'FIRST (2) /= SECOND_INDEX'FIRST) OR
438
             (SECOND'FIRST /= FIRST_INDEX'FIRST) OR
439
             (SECOND'FIRST (1) /= FIRST_INDEX'FIRST) OR
440
             (SECOND'FIRST (2) /= SECOND_INDEX'FIRST) THEN
441
               REPORT.FAILED ("PROBLEMS WITH 'FIRST. " & REMARKS) ;
442
          END IF ;
443
 
444
          IF (FIRST'LAST /= FIRST_INDEX'LAST) OR
445
             (FIRST'LAST (1) /= FIRST_INDEX'LAST) OR
446
             (FIRST'LAST (2) /= SECOND_INDEX'LAST) OR
447
             (SECOND'LAST /= FIRST_INDEX'LAST) OR
448
             (SECOND'LAST (1) /= FIRST_INDEX'LAST) OR
449
             (SECOND'LAST (2) /= SECOND_INDEX'LAST) THEN
450
               REPORT.FAILED ("PROBLEMS WITH 'LAST. " & REMARKS) ;
451
          END IF ;
452
 
453
          IF (FIRST'LENGTH /=
454
              FIRST_INDEX'POS (FIRST_INDEX'LAST)
455
              - FIRST_INDEX'POS (FIRST_INDEX'FIRST) + 1) OR
456
             (FIRST'LENGTH (1) /=
457
              FIRST_INDEX'POS (FIRST_INDEX'LAST)
458
              - FIRST_INDEX'POS (FIRST_INDEX'FIRST) + 1) OR
459
             (FIRST'LENGTH (2) /=
460
              SECOND_INDEX'POS (SECOND_INDEX'LAST)
461
              - SECOND_INDEX'POS (SECOND_INDEX'FIRST) + 1) OR
462
             (SECOND'LENGTH /=
463
              FIRST_INDEX'POS (FIRST_INDEX'LAST)
464
              - FIRST_INDEX'POS (FIRST_INDEX'FIRST) + 1) OR
465
             (SECOND'LENGTH (1) /=
466
              FIRST_INDEX'POS (FIRST_INDEX'LAST)
467
              - FIRST_INDEX'POS (FIRST_INDEX'FIRST) + 1) OR
468
             (SECOND'LENGTH (2) /=
469
              SECOND_INDEX'POS (SECOND_INDEX'LAST)
470
              - SECOND_INDEX'POS (SECOND_INDEX'FIRST) + 1) THEN
471
               REPORT.FAILED ("PROBLEMS WITH 'LENGTH. " & REMARKS) ;
472
          END IF ;
473
 
474
          IF (FFIRT NOT IN FIRST'RANGE (1)) OR
475
             (FFIRT NOT IN FIRST'RANGE) OR
476
             (SFIRT NOT IN SECOND'RANGE (1)) OR
477
             (SFIRT NOT IN SECOND'RANGE) OR
478
             (FSIRT NOT IN FIRST'RANGE (2)) OR
479
             (SSIRT NOT IN SECOND'RANGE (2)) THEN
480
                REPORT.FAILED ("INCORRECT HANDLING OF 'RANGE ATTRIBUE. " &
481
                               REMARKS) ;
482
          END IF ;
483
 
484
          IF CONSTRAINED_ARRAY'SIZE <= 0 THEN
485
               REPORT.FAILED ("PROBLEMS WITH THE 'SIZE ATTRIBUTE. " &
486
                              REMARKS) ;
487
          END IF ;
488
 
489
          IF FIRST'ADDRESS = SECOND'ADDRESS THEN
490
               REPORT.FAILED ("PROBLEMS WITH THE 'ADDRESS ATTRIBUTE. " &
491
                              REMARKS) ;
492
          END IF ;
493
 
494
     END CTEST_PROCEDURE ;
495
 
496
     PROCEDURE FIRST_TEST_PROCEDURE IS NEW TEST_PROCEDURE
497
               (FIRST_INDEX            => SHORT_RANGE,
498
                SECOND_INDEX           => MEDIUM_RANGE,
499
                UNCONSTRAINED_ARRAY    => FIRST_TEMPLATE) ;
500
 
501
     PROCEDURE NEW_CTEST_PROCEDURE IS NEW CTEST_PROCEDURE
502
               (FIRST_INDEX           => SHORT_RANGE,
503
                SECOND_INDEX          => MEDIUM_RANGE,
504
                COMPONENT_TYPE        => DATE,
505
                CONSTRAINED_ARRAY     => SECOND_TEMPLATE) ;
506
 
507
     PROCEDURE NP IS NEW P (SUBINT, DATE, TODAY, ARRA, A1,
508
                            ARRA, A2, ARRB, A3, ARRC, A4, ARRD,
509
                            A5, ARRE, A6, ARRE, A6);
510
 
511
BEGIN  -- CC1224A
512
 
513
     REPORT.TEST ("CC1224A", "FOR ARRAY TYPES WITH A NONLIMITED " &
514
                  "COMPONENT TYPE (OF A FORMAL AND NONFORMAL GENERIC " &
515
                  "TYPE), CHECK THAT THE FOLLOWING OPERATIONS " &
516
                  "ARE IMPLICITY DECLARED AND ARE, THEREFORE, " &
517
                  "AVAILABLE WITHIN THE GENERIC -- UNIT: " &
518
                  "ASSIGNMENT, THE OPERATION ASSOCIATED WITH " &
519
                  "AGGREGATE NOTATION, MEMBERSHIP TESTS, THE " &
520
                  "OPERATION ASSOCIATED WITH INDEXED " &
521
                  "COMPONENTS, QUALIFICATION, EXPLICIT " &
522
                  "CONVERSION, 'SIZE, 'ADDRESS, 'FIRST, " &
523
                  "'FIRST (N), 'LAST, 'LAST (N), 'RANGE, " &
524
                  "'RANGE (N), 'LENGTH, 'LENGTH (N)" ) ;
525
 
526
     NP ;
527
 
528
     FIRST_TEST_PROCEDURE (FIRST        => FIRST_ARRAY,
529
                           FFIFS        => -10,
530
                           FFILS        => 10,
531
                           FSIFS        => 6,
532
                           FSILS        => 10,
533
                           FFLEN        => 21,
534
                           FSLEN        => 5,
535
                           FFIRT        => 0,
536
                           FSIRT        => 8,
537
                           SECOND       => SECOND_ARRAY,
538
                           SFIFS        => 0,
539
                           SFILS        => 7,
540
                           SSIFS        => 1,
541
                           SSILS        => 15,
542
                           SFLEN        => 8,
543
                           SSLEN        => 15,
544
                           SFIRT        => 5,
545
                           SSIRT        => 13,
546
                           REMARKS      => "FIRST_TEST_PROCEDURE") ;
547
 
548
     NEW_CTEST_PROCEDURE (FIRST         => THIRD_ARRAY,
549
                          FFIRT         => -5,
550
                          FSIRT         => 11,
551
                          SECOND        => FOURTH_ARRAY,
552
                          SFIRT         => 0,
553
                          SSIRT         => 14,
554
                          REMARKS       => "NEW_CTEST_PROCEDURE") ;
555
 
556
     REPORT.RESULT ;
557
 
558
END CC1224A;

powered by: WebSVN 2.1.0

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