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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [cd/] [cd4051b.ada] - Blame information for rev 720

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 720 jeremybenn
-- CD4051B.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 RECORD REPRESENTATION CLAUSE WHICH CHANGES THE
27
--     ORDER OF THE COMPONENT STORAGE CAN BE GIVEN FOR A DERIVED TYPE
28
--     WHOSE PARENT TYPE IS A RECORD WITHOUT A DISCRIMINANT.
29
 
30
-- HISTORY:
31
--     BCB 03/20/89  CHANGED EXTENSION FROM '.ADA' TO '.DEP'.
32
--     RJW 08/25/87  CREATED ORIGINAL TEST.
33
 
34
WITH REPORT; USE REPORT;
35
WITH SYSTEM;
36
PROCEDURE CD4051B IS
37
 
38
     UNITS_PER_INTEGER : CONSTANT :=
39
                      (INTEGER'SIZE + SYSTEM.STORAGE_UNIT - 1) /
40
                      SYSTEM.STORAGE_UNIT;
41
 
42
     TYPE BASIC_CLAUSE IS RECORD
43
          INT_COMP    : INTEGER;
44
          CHAR_COMP   : CHARACTER;
45
     END RECORD;
46
 
47
     TYPE CHECK_CLAUSE IS NEW BASIC_CLAUSE;
48
 
49
     FOR CHECK_CLAUSE USE
50
          RECORD
51
               INT_COMP AT 1*UNITS_PER_INTEGER
52
                           RANGE 0..INTEGER'SIZE - 1;
53
               CHAR_COMP AT 0
54
                           RANGE 0..CHARACTER'SIZE - 1;
55
          END RECORD;
56
 
57
     CHECK_RECORD : CHECK_CLAUSE := (1, 'A');
58
 
59
BEGIN
60
     TEST ("CD4051B", "CHECK THAT A RECORD REPRESENTATION " &
61
                      "CLAUSE WHICH CHANGES THE ORDER OF COMPONENT " &
62
                      "STORAGE CAN BE GIVEN FOR A DERIVED TYPE " &
63
                      "WHOSE PARENT TYPE IS IS A RECORD TYPE " &
64
                      "WITHOUT DISCRIMINANTS");
65
 
66
     IF CHECK_RECORD.INT_COMP'FIRST_BIT /= 0 THEN
67
          FAILED ("INCORRECT VALUE FOR FIRST_BIT OF INT_COMP");
68
     END IF;
69
 
70
     IF CHECK_RECORD.INT_COMP'LAST_BIT /= INTEGER'SIZE - 1 THEN
71
          FAILED ("INCORRECT VALUE FOR LAST_BIT OF INT_COMP");
72
     END IF;
73
 
74
     IF CHECK_RECORD.INT_COMP'POSITION /=
75
               IDENT_INT (UNITS_PER_INTEGER) THEN
76
          FAILED ("INCORRECT VALUE FOR POSITION OF INT_COMP");
77
     END IF;
78
 
79
     IF CHECK_RECORD.CHAR_COMP'FIRST_BIT /= IDENT_INT (0) THEN
80
          FAILED ("INCORRECT VALUE FOR FIRST_BIT OF CHAR_COMP");
81
     END IF;
82
 
83
     IF CHECK_RECORD.CHAR_COMP'LAST_BIT /=
84
               IDENT_INT (CHARACTER'SIZE - 1) THEN
85
          FAILED ("INCORRECT VALUE FOR LAST_BIT OF CHAR_COMP");
86
     END IF;
87
 
88
     IF CHECK_RECORD.CHAR_COMP'POSITION /=
89
               IDENT_INT (0) THEN
90
          FAILED ("INCORRECT VALUE FOR POSITION OF CHAR_COMP");
91
     END IF;
92
 
93
     RESULT;
94
END CD4051B;

powered by: WebSVN 2.1.0

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