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 CONSTRAINT ERROR IS RAISED BY THE ATTRIBUTES
27 -- 'PRED' AND 'SUCC' WHEN THE PREFIX IS A CHARACTER TYPE
28 -- AND THE RESULT IS OUTSIDE OF THE BASE TYPE.
31 -- JET 08/18/87 CREATED ORIGINAL TEST.
33 WITH REPORT
; USE REPORT
;
37 TYPE CHAR
IS ('A', B
);
39 TYPE NEWCHAR
IS NEW CHAR
;
41 FUNCTION IDENT
(CH
: CHAR
) RETURN CHAR
IS
43 RETURN CHAR
'VAL (IDENT_INT
(CHAR
'POS (CH
)));
46 FUNCTION IDENT
(CH
: NEWCHAR
) RETURN NEWCHAR
IS
48 RETURN NEWCHAR
'VAL (IDENT_INT
(NEWCHAR
'POS (CH
)));
53 TEST
( "C35505F" , "CHECK THAT CONSTRAINT ERROR IS RAISED BY " &
54 "THE ATTRIBUTES 'PRED' AND 'SUCC' WHEN THE " &
55 "PREFIX IS A CHARACTER TYPE AND THE RESULT " &
56 "IS OUTSIDE OF THE BASE TYPE" );
59 IF CHAR
'PRED (IDENT
('A')) = 'A' THEN
60 FAILED
( "NO EXCEPTION RAISED " &
61 "FOR CHAR'PRED (IDENT ('A')) - 1" );
63 FAILED
( "NO EXCEPTION RAISED " &
64 "FOR CHAR'PRED (IDENT ('A')) - 2" );
67 WHEN CONSTRAINT_ERROR
=>
70 FAILED
( "WRONG EXCEPTION RAISED " &
71 "FOR CHAR'PRED (IDENT ('A'))" );
75 IF CHAR
'SUCC (IDENT
(B
)) = B
THEN
76 FAILED
( "NO EXCEPTION RAISED " &
77 "FOR CHAR'SUCC (IDENT (B)) - 1" );
79 FAILED
( "NO EXCEPTION RAISED " &
80 "FOR CHAR'SUCC (IDENT (B)) - 2" );
83 WHEN CONSTRAINT_ERROR
=>
86 FAILED
( "WRONG EXCEPTION RAISED " &
87 "FOR CHAR'SUCC (IDENT (B))" );
91 IF NEWCHAR
'PRED (IDENT
('A')) = 'A' THEN
92 FAILED
( "NO EXCEPTION RAISED " &
93 "FOR NEWCHAR'PRED (IDENT ('A')) - 1" );
95 FAILED
( "NO EXCEPTION RAISED " &
96 "FOR NEWCHAR'PRED (IDENT ('A')) - 2" );
99 WHEN CONSTRAINT_ERROR
=>
102 FAILED
( "WRONG EXCEPTION RAISED " &
103 "FOR NEWCHAR'PRED (IDENT ('A'))" );
107 IF NEWCHAR
'SUCC (IDENT
(B
)) = 'A' THEN
108 FAILED
( "NO EXCEPTION RAISED " &
109 "FOR NEWCHAR'SUCC (IDENT (B)) - 1" );
111 FAILED
( "NO EXCEPTION RAISED " &
112 "FOR NEWCHAR'SUCC (IDENT (B)) - 2" );
115 WHEN CONSTRAINT_ERROR
=>
118 FAILED
( "WRONG EXCEPTION RAISED " &
119 "FOR NEWCHAR'SUCC (IDENT (B))" );
123 IF CHARACTER'PRED (IDENT_CHAR
(CHARACTER'BASE'FIRST)) = 'A
'
125 FAILED ( "NO EXCEPTION RAISED " &
126 "FOR CHARACTER'PRED " &
127 "(IDENT_CHAR (CHARACTER'BASE'FIRST
)) - 1" );
129 FAILED ( "NO
EXCEPTION RAISED
" &
130 "FOR CHARACTER'PRED " &
131 "(IDENT_CHAR
(CHARACTER'BASE'FIRST)) - 2" );
134 WHEN CONSTRAINT_ERROR =>
137 FAILED ( "WRONG EXCEPTION RAISED " &
138 "FOR CHARACTER'PRED " &
139 "(IDENT_CHAR (CHARACTER'BASE'FIRST
))" );
143 IF CHARACTER'SUCC (IDENT_CHAR (CHARACTER'BASE'LAST)) = 'Z'
145 FAILED ( "NO
EXCEPTION RAISED
" &
146 "FOR CHARACTER'SUCC " &
147 "(IDENT_CHAR
(CHARACTER'BASE'LAST)) - 1" );
149 FAILED ( "NO EXCEPTION RAISED " &
150 "FOR CHARACTER'SUCC " &
151 "(IDENT_CHAR (CHARACTER'BASE'LAST
)) - 2" );
154 WHEN CONSTRAINT_ERROR =>
157 FAILED ( "WRONG
EXCEPTION RAISED
" &
158 "FOR CHARACTER'SUCC " &
159 "(IDENT_CHAR
(CHARACTER'BASE'LAST))" );