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/] [c3/] [c36203a.ada] - Blame information for rev 309

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

Line No. Rev Author Line
1 294 jeremybenn
-- C36203A.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 'LENGTH YIELDS A RESULT OF TYPE UNIVERSAL INTEGER.
26
 
27
-- L.BROWN  07/31/86
28
 
29
WITH REPORT; USE REPORT;
30
PROCEDURE C36203A IS
31
 
32
     TYPE NINT IS NEW INTEGER RANGE 1 .. 5;
33
 
34
     TYPE INT_ARR IS ARRAY(INTEGER RANGE 1 .. 3) OF INTEGER;
35
     TYPE INT2_ARR IS ARRAY(INTEGER RANGE 1 .. 3,
36
                            INTEGER RANGE 1 .. 2) OF INTEGER;
37
 
38
     OBJA : INTEGER := 3;
39
     OBJB : NINT := 3;
40
 
41
BEGIN
42
     TEST("C36203A", "'LENGTH YIELDS A RESULT OF TYPE " &
43
                     "UNIVERSAL INTEGER");
44
     IF (OBJA + INT_ARR'LENGTH) /= IDENT_INT(6)  THEN
45
          FAILED("INCORRECT VALUE RETURNED BY 'LENGTH " &
46
                 "FOR ONE-DIM ARRAY TYPE 1");
47
     END IF;
48
 
49
     IF (OBJB + INT_ARR'LENGTH) /= 6  THEN
50
          FAILED("INCORRECT VALUE RETURNED BY 'LENGTH " &
51
                 "FOR ONE-DIM ARRAY TYPE 2");
52
     END IF;
53
 
54
     IF (OBJA + INT2_ARR'LENGTH(1)) /= IDENT_INT(6)  THEN
55
          FAILED("INCORRECT VALUE RETURNED BY 'LENGTH " &
56
                 "FOR FIRST DIMENSION OF TWO-DIM ARRAY TYPE 1");
57
     END IF;
58
 
59
     IF (OBJB + INT2_ARR'LENGTH(1)) /= 6  THEN
60
          FAILED("INCORRECT VALUE RETURNED BY 'LENGTH " &
61
                 "FOR FIRST DIMENSION OF TWO-DIM ARRAY TYPE 2");
62
     END IF;
63
 
64
     IF (OBJA + INT2_ARR'LENGTH(2)) /= IDENT_INT(5)  THEN
65
          FAILED("INCORRECT VALUE RETURNED BY 'LENGTH " &
66
                 "FOR SECOND DIMENSION OF TWO-DIM ARRAY TYPE 1");
67
     END IF;
68
 
69
     IF (OBJB + INT2_ARR'LENGTH(2)) /= 5  THEN
70
          FAILED("INCORRECT VALUE RETURNED BY 'LENGTH " &
71
                 "FOR SECOND DIMENSION OF TWO-DIM ARRAY TYPE 2");
72
     END IF;
73
 
74
     RESULT;
75
 
76
END C36203A;

powered by: WebSVN 2.1.0

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