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.
25 -- CHECK THAT THE ATTRIBUTES 'IMAGE' AND 'VALUE' YIELD THE CORRECT
26 -- RESULTS WHEN THE PREFIX IS A BOOLEAN TYPE.
29 -- (A). TESTS FOR IMAGE.
30 -- (B). TESTS FOR VALUE.
34 WITH REPORT
; USE REPORT
;
38 TYPE NEWBOOL
IS NEW BOOLEAN;
42 TEST
( "C35508C" , "CHECK THAT THE ATTRIBUTES 'IMAGE' AND " &
43 "'VALUE' YIELD THE CORRECT RESULTS WHEN THE " &
44 "PREFIX IS A BOOLEAN TYPE" );
49 A5
, B5
: INTEGER := IDENT_INT
(5);
50 C6
: INTEGER := IDENT_INT
(6);
53 IF BOOLEAN'IMAGE ( A5
= B5
) /= "TRUE" THEN
54 FAILED
( "INCORRECT IMAGE FOR 'A5 = B5'" );
56 IF BOOLEAN'IMAGE ( A5
= B5
)'FIRST /= 1 THEN
57 FAILED
( "INCORRECT LOWER BOUND FOR 'A5 = B5'" );
60 IF BOOLEAN'IMAGE ( C6
= A5
) /= "FALSE" THEN
61 FAILED
( "INCORRECT IMAGE FOR 'C6 = A5'" );
63 IF BOOLEAN'IMAGE ( C6
= A5
)'FIRST /= 1 THEN
64 FAILED
( "INCORRECT LOWER BOUND FOR 'C6 = A5'" );
67 IF BOOLEAN'IMAGE (TRUE) /= "TRUE" THEN
68 FAILED
( "INCORRECT IMAGE FOR 'TRUE'" );
70 IF BOOLEAN'IMAGE (TRUE)'FIRST /= 1 THEN
71 FAILED
( "INCORRECT LOWER BOUND FOR 'TRUE'" );
74 IF NEWBOOL
'IMAGE (FALSE) /= "FALSE" THEN
75 FAILED
( "INCORRECT IMAGE FOR NEWBOOL'FALSE'" );
77 IF NEWBOOL
'IMAGE (FALSE)'FIRST /= 1 THEN
78 FAILED
( "INCORRECT LOWER BOUND FOR NEWBOOL'FALSE'" );
82 -----------------------------------------------------------------------
87 IF BOOLEAN'VALUE (IDENT_STR
("TRUE")) /= TRUE THEN
88 FAILED
( "INCORRECT VALUE FOR ""TRUE""" );
92 FAILED
( "EXCEPTION RAISED - VALUE FOR ""TRUE""" );
96 IF NEWBOOL
'VALUE (IDENT_STR
("FALSE")) /= FALSE THEN
97 FAILED
( "INCORRECT VALUE FOR ""FALSE""" );
101 FAILED
( "EXCEPTION RAISED - VALUE FOR ""FALSE""" );
105 IF BOOLEAN'VALUE ("true") /= TRUE THEN
106 FAILED
( "INCORRECT VALUE FOR ""true""" );
110 FAILED
( "EXCEPTION RAISED - VALUE FOR ""true""" );
114 IF NEWBOOL
'VALUE ("false") /= FALSE THEN
115 FAILED
( "INCORRECT VALUE FOR ""false""" );
119 FAILED
( "EXCEPTION RAISED - VALUE FOR " &
124 IF BOOLEAN'VALUE (IDENT_STR
("TRUE ")) /= TRUE THEN
125 FAILED
( "INCORRECT VALUE WITH TRAILING BLANKS" );
129 FAILED
( "EXCEPTION RAISED - VALUE - " &
134 IF NEWBOOL
'VALUE (" FALSE") /= FALSE THEN
135 FAILED
( "INCORRECT VALUE WITH LEADING BLANKS" );
139 FAILED
( "EXCEPTION RAISED - VALUE - LEADING " &
144 SUBTYPE SUBBOOL
IS BOOLEAN RANGE FALSE .. FALSE;
146 IF SUBBOOL
'VALUE (IDENT_STR
("TRUE")) /= TRUE THEN
147 FAILED
( "INCORRECT VALUE - ""TRUE"" AND " &
152 FAILED
( "EXCEPTION RAISED - SUBBOOL" );
156 IF BOOLEAN'VALUE (IDENT_STR
("MAYBE")) = TRUE THEN
157 FAILED
( "NO EXCEPTION RAISED - ""MAYBE"" - 1" );
159 FAILED
( "NO EXCEPTION RAISED - ""MAYBE"" - 2" );
162 WHEN CONSTRAINT_ERROR
=>
165 FAILED
( "WRONG EXCEPTION RAISED - ""MAYBE"" " );
169 IF BOOLEAN'VALUE (IDENT_CHAR
(ASCII
.HT
) & "TRUE") = TRUE THEN
170 FAILED
( "NO EXCEPTION RAISED - LEADING 'HT' - 1" );
172 FAILED
( "NO EXCEPTION RAISED - LEADING 'HT' - 2" );
175 WHEN CONSTRAINT_ERROR
=>
178 FAILED
( "WRONG EXCEPTION RAISED - LEADING 'HT'" );
182 IF NEWBOOL
'VALUE ("FALSE" & ASCII
.HT
) = FALSE THEN
183 FAILED
( "NO EXCEPTION RAISED - TRAILING 'HT' - 1" );
185 FAILED
( "NO EXCEPTION RAISED - TRAILING 'HT' - 2" );
188 WHEN CONSTRAINT_ERROR
=>
191 FAILED
( "WRONG EXCEPTION RAISED - TRAILING 'HT'" );