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 GET FOR ENUMERATION TYPES CAN OPERATE ON STRINGS.
27 -- CHECK THAT IT RAISES END_ERROR WHEN THE STRING IS NULL OR
28 -- EMPTY. CHECK THAT LAST CONTAINS THE INDEX VALUE OF THE LAST
29 -- CHARACTER READ FROM THE STRING.
34 -- JBG 02/22/84 CHANGED TO .ADA TEST
35 -- DWC 09/18/87 ADDED CASES WHICH CONTAIN TABS WITH AND WITHOUT
36 -- ENUMERATION LITERALS.
46 TEST
("CE3908A", "CHECK THAT GET FOR ENUMERATION TYPES CAN " &
47 "OPERATE ON STRINGS. CHECK THAT IT RAISES " &
48 "END_ERROR WHEN THE STRING IS NULL OR EMPTY. " &
49 "CHECK THAT LAST CONTAINS THE INDEX VALUE OF " &
50 "THE LAST CHARACTER READ FROM THE STRING");
53 TYPE FRUIT
IS (APPLE
, PEAR
, ORANGE
, STRAWBERRY
);
55 PACKAGE FRUIT_IO
IS NEW ENUMERATION_IO
(FRUIT
);
59 GET
("APPLE ", DESSERT
, L
);
60 IF DESSERT
/= APPLE
THEN
61 FAILED
("ENUMERATION VALUE FROM STRING INCORRECT - 1");
64 IF L
/= IDENT_INT
(5) THEN
65 FAILED
("LAST CONTAINS INCORRECT VALUE AFTER GET - 1");
68 GET
("APPLE", DESSERT
, L
);
69 IF DESSERT
/= APPLE
THEN
70 FAILED
("ENUMERATION VALUE FROM STRING INCORRECT - 2");
73 IF L
/= IDENT_INT
(5) THEN
74 FAILED
("LAST CONTAINS INCORRECT VALUE AFTER GET - 2");
78 GET
(ASCII
.HT
& "APPLE", DESSERT
, L
);
79 IF DESSERT
/= APPLE
THEN
80 FAILED
("ENUMERATION VALUE FROM STRING " &
83 IF L
/= IDENT_INT
(6) THEN
84 FAILED
("LAST CONTAINS INCORRECT VALUE AFTER " &
89 FAILED
("GET DID NOT SKIP LEADING TABS");
91 FAILED
("WRONG EXCEPTION RAISED - 3");
94 -- NULL STRING LITERAL.
98 FAILED
("END_ERROR NOT RAISED - 4");
101 IF L
/= IDENT_INT
(6) THEN
102 FAILED
("LAST CONTAINS INCORRECT VALUE " &
106 FAILED
("WRONG EXCEPTION RAISED - 4");
110 GET
(ASCII
.HT
& "", DESSERT
, L
);
111 FAILED
("END_ERROR NOT RAISED - 5");
114 IF L
/= IDENT_INT
(6) THEN
115 FAILED
("LAST CONTAINS INCORRECT VALUE " &
119 FAILED
("WRONG EXCEPTION RAISED - 5");
122 -- STRING LITERAL WITH BLANKS.
125 GET
(" ", DESSERT
, L
);
126 FAILED
("END ERROR NOT RAISED - 6");
129 IF L
/= IDENT_INT
(6) THEN
130 FAILED
("LAST CONTAINS INCORRECT VALUE " &
134 FAILED
("WRONG EXCEPTION RAISED - 6");