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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CA2009C0M.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 GENERIC PACKAGE SUBUNIT CAN BE SPECIFIED AND
27
--     INSTANTIATED.  IN THIS TEST, THE SUBUNIT BODY IS IN A
28
--     SEPARATE FILE.
29
 
30
-- APPLICABILITY CRITERIA:
31
--     THIS TEST MUST RUN AND REPORT "PASSED" FOR ALL ADA 95 IMPLEMENTATIONS.
32
 
33
-- SEPARATE FILES ARE:
34
--     CA2009C0M  THE MAIN PROCEDURE.
35
--     CA2009C1   A SUBUNIT PACKAGE BODY (PKG1).
36
 
37
-- HISTORY:
38
--     BHS 08/01/84  CREATED ORIGINAL TEST.
39
--     BCB 01/05/88  MODIFIED HEADER.
40
--     EDS 08/04/98  REMOVE CONTROL Z AT END OF FILE.
41
--     RLB 09/13/99  UPDATED APPLICABILITY CRITERIA FOR ADA 95.
42
--     RLB 09/15/99  REMOVED JUNK COMMENT.
43
 
44
WITH REPORT;
45
USE REPORT;
46
PROCEDURE CA2009C0M IS
47
 
48
     INT1 : INTEGER := 1;
49
 
50
     SUBTYPE STR15 IS STRING (1..15);
51
     SVAR : STR15 := "ABCDEFGHIJKLMNO";
52
 
53
     GENERIC
54
          TYPE ITEM IS PRIVATE;
55
          CON1 : IN ITEM;
56
          VAR1 : IN OUT ITEM;
57
     PACKAGE PKG1 IS
58
     END PKG1;
59
 
60
     PACKAGE BODY PKG1 IS SEPARATE;
61
 
62
     PACKAGE NI_PKG1 IS NEW PKG1 (INTEGER, IDENT_INT(2), INT1);
63
     PACKAGE NS_PKG1 IS NEW PKG1 (STR15, IDENT_STR("REINSTANTIATION"),
64
                                  SVAR);
65
 
66
BEGIN
67
 
68
     TEST ("CA2009C", "SPECIFICATION AND INSTANTIATION " &
69
                      "OF GENERIC PACKAGE SUBUNITS " &
70
                      " -  SEPARATE FILES USED");
71
 
72
     IF INT1 /= 2 THEN
73
          FAILED ("INCORRECT INSTANTIATION - INTEGER");
74
     END IF;
75
 
76
     IF SVAR /= "REINSTANTIATION" THEN
77
          FAILED ("INCORRECT INSTANTIATION - STRING");
78
     END IF;
79
 
80
 
81
     RESULT;
82
 
83
END CA2009C0M;

powered by: WebSVN 2.1.0

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