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/] [c8/] [c85011a.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
-- C85011A.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
--     CHECK THAT A PACKAGE CAN BE RENAMED AND THE NEW NAME CAN APPEAR
27
--     IN A RENAMING DECLARATION, AND THAT A 'USE' CLAUSE CAN REFER TO
28
--     THE PACKAGE BY EITHER NAME, INCLUDING RENAMINGS OF GENERIC AND
29
--     NONGENERIC PACKAGES INSIDE THEMSELVES.
30
 
31
-- HISTORY:
32
--     JET 04/28/88  CREATED ORIGINAL TEST.
33
 
34
WITH REPORT; USE REPORT;
35
PROCEDURE C85011A IS
36
 
37
     PACKAGE PACK1 IS
38
          I : NATURAL := 0;
39
          PACKAGE PACKA RENAMES PACK1;
40
     END PACK1;
41
 
42
     GENERIC
43
          TYPE T IS RANGE <>;
44
     PACKAGE GPACK IS
45
          J : T := T'FIRST;
46
          PACKAGE PACKB RENAMES GPACK;
47
     END GPACK;
48
 
49
     PACKAGE PACK2 IS NEW GPACK(NATURAL);
50
 
51
     PACKAGE PACK3 RENAMES PACK1;
52
     PACKAGE PACK4 RENAMES PACK2;
53
     PACKAGE PACK5 RENAMES PACK3;
54
     PACKAGE PACK6 RENAMES PACK4;
55
 
56
BEGIN
57
     TEST ("C85011A", "CHECK THAT A PACKAGE CAN BE RENAMED AND THE " &
58
                      "NEW NAME CAN APPEAR IN A RENAMING " &
59
                      "DECLARATION, AND THAT A 'USE' CLAUSE CAN " &
60
                      "REFER TO THE PACKAGE BY EITHER NAME, " &
61
                      "INCLUDING RENAMINGS OF GENERIC AND NONGENERIC " &
62
                      "PACKAGES INSIDE THEMSELVES");
63
 
64
     IF PACK1.I /= IDENT_INT(0) THEN
65
          FAILED ("INCORRECT VALUE OF PACK1.I");
66
     END IF;
67
 
68
     IF PACK2.J /= IDENT_INT(0) THEN
69
          FAILED ("INCORRECT VALUE OF PACK2.J");
70
     END IF;
71
 
72
     IF PACK3.I /= IDENT_INT(0) THEN
73
          FAILED ("INCORRECT VALUE OF PACK3.I");
74
     END IF;
75
 
76
     IF PACK4.J /= IDENT_INT(0) THEN
77
          FAILED ("INCORRECT VALUE OF PACK4.J");
78
     END IF;
79
 
80
     IF PACK5.I /= IDENT_INT(0) THEN
81
          FAILED ("INCORRECT VALUE OF PACK5.I");
82
     END IF;
83
 
84
     IF PACK6.J /= IDENT_INT(0) THEN
85
          FAILED ("INCORRECT VALUE OF PACK6.J");
86
     END IF;
87
 
88
     IF PACK1.PACKA.I /= IDENT_INT(0) THEN
89
          FAILED ("INCORRECT VALUE OF PACK1.PACKA.I");
90
     END IF;
91
 
92
     IF PACK2.PACKB.J /= IDENT_INT(0) THEN
93
          FAILED ("INCORRECT VALUE OF PACK2.PACKB.J");
94
     END IF;
95
 
96
     DECLARE
97
          USE PACK1, PACK2;
98
     BEGIN
99
          IF I /= IDENT_INT(0) THEN
100
               FAILED ("INCORRECT VALUE OF I (1)");
101
          END IF;
102
 
103
          IF J /= IDENT_INT(0) THEN
104
               FAILED ("INCORRECT VALUE OF J (1)");
105
          END IF;
106
     END;
107
 
108
     DECLARE
109
          USE PACK3, PACK4;
110
     BEGIN
111
          IF I /= IDENT_INT(0) THEN
112
               FAILED ("INCORRECT VALUE OF I (2)");
113
          END IF;
114
 
115
          IF J /= IDENT_INT(0) THEN
116
               FAILED ("INCORRECT VALUE OF J (2)");
117
          END IF;
118
     END;
119
 
120
     DECLARE
121
          USE PACK5, PACK6;
122
     BEGIN
123
          IF I /= IDENT_INT(0) THEN
124
               FAILED ("INCORRECT VALUE OF I (3)");
125
          END IF;
126
 
127
          IF J /= IDENT_INT(0) THEN
128
               FAILED ("INCORRECT VALUE OF J (3)");
129
          END IF;
130
     END;
131
 
132
     DECLARE
133
          USE PACK1.PACKA, PACK2.PACKB;
134
     BEGIN
135
          IF I /= IDENT_INT(0) THEN
136
               FAILED ("INCORRECT VALUE OF I (4)");
137
          END IF;
138
 
139
          IF J /= IDENT_INT(0) THEN
140
               FAILED ("INCORRECT VALUE OF J (4)");
141
          END IF;
142
     END;
143
 
144
     RESULT;
145
END C85011A;

powered by: WebSVN 2.1.0

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