3 -- Grant of Unlimited Rights
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
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.
26 -- CHECK THAT A RECORD REPRESENTATION CLAUSE CAN BE GIVEN FOR
27 -- A DERIVED TYPE WHOSE PARENT TYPE IS A RECORD WITH A
31 -- BCB 03/20/89 CHANGED EXTENSION FROM '.ADA' TO '.DEP'.
32 -- RJW 08/25/87 CREATED ORIGINAL TEST.
34 WITH REPORT
; USE REPORT
;
38 UNITS_PER_INTEGER
: CONSTANT :=
39 (INTEGER'SIZE + SYSTEM
.STORAGE_UNIT
- 1) /
42 TYPE BASIC_CLAUSE
(DISC
: BOOLEAN) IS RECORD
44 CHAR_COMP
: CHARACTER;
47 TYPE CHECK_CLAUSE
IS NEW BASIC_CLAUSE
;
52 RANGE 0..BOOLEAN'SIZE - 1;
53 INT_COMP
AT 1*UNITS_PER_INTEGER
54 RANGE 0..INTEGER'SIZE - 1;
55 CHAR_COMP
AT 2*UNITS_PER_INTEGER
56 RANGE 0..CHARACTER'SIZE - 1;
59 CHECK_RECORD
: CHECK_CLAUSE
(TRUE) := (TRUE, 1, 'A');
62 TEST
("CD4051C", "CHECK THAT A RECORD REPRESENTATION " &
63 "CLAUSE CAN BE GIVEN FOR A DERIVED TYPE " &
64 "WHOSE PARENT TYPE IS IS A RECORD TYPE " &
65 "WITH DISCRIMINANTS");
67 IF CHECK_RECORD
.DISC
'FIRST_BIT /= 0 THEN
68 FAILED
("INCORRECT VALUE FOR FIRST_BIT OF DISC");
71 IF CHECK_RECORD
.DISC
'LAST_BIT /= BOOLEAN'SIZE - 1 THEN
72 FAILED
("INCORRECT VALUE FOR LAST_BIT OF DISC");
75 IF CHECK_RECORD
.DISC
'POSITION /= IDENT_INT
(0) THEN
76 FAILED
("INCORRECT VALUE FOR POSITION OF DISC");
79 IF CHECK_RECORD
.INT_COMP
'FIRST_BIT /= 0 THEN
80 FAILED
("INCORRECT VALUE FOR FIRST_BIT OF INT_COMP");
83 IF CHECK_RECORD
.INT_COMP
'LAST_BIT /=
84 IDENT_INT
(INTEGER'SIZE - 1) THEN
85 FAILED
("INCORRECT VALUE FOR LAST_BIT OF INT_COMP");
88 IF CHECK_RECORD
.INT_COMP
'POSITION /=
89 IDENT_INT
(UNITS_PER_INTEGER
) THEN
90 FAILED
("INCORRECT VALUE FOR POSITION OF INT_COMP");
93 IF CHECK_RECORD
.CHAR_COMP
'FIRST_BIT /= IDENT_INT
(0) THEN
94 FAILED
("INCORRECT VALUE FOR FIRST_BIT OF CHAR_COMP");
97 IF CHECK_RECORD
.CHAR_COMP
'LAST_BIT /=
98 IDENT_INT
(CHARACTER'SIZE - 1) THEN
99 FAILED
("INCORRECT VALUE FOR LAST_BIT OF CHAR_COMP");
102 IF CHECK_RECORD
.CHAR_COMP
'POSITION /=
103 IDENT_INT
(2 * UNITS_PER_INTEGER
) THEN
104 FAILED
("INCORRECT VALUE FOR POSITION OF CHAR_COMP");