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 UNARY "+" AND "-" YIELD CORRECT RESULTS FOR
27 -- PREDEFINED INTEGER OPERANDS.
30 -- JET 01/25/88 CREATED ORIGINAL TEST.
31 -- PWN 10/27/95 REMOVED OUT OF RANGE STATIC VALUE CHECKS.
33 WITH REPORT
; USE REPORT
;
37 TYPE DT
IS NEW INTEGER RANGE -3..3;
42 TEST
("C45411A", "CHECK THAT UNARY ""+"" AND ""-"" YIELD " &
43 "CORRECT RESULTS FOR PREDEFINED INTEGER " &
46 FOR I
IN (1-2)..INTEGER(1) LOOP
47 IF "-"(RIGHT
=> I1
) /= IDENT_INT
(I
) THEN
48 FAILED
("INCORRECT RESULT FOR ""-"" -" &
52 IF +I1
/= IDENT_INT
(I1
) THEN
53 FAILED
("INCORRECT RESULT FOR ""+"" -" &
59 FOR I
IN (1-2)..INTEGER(1) LOOP
60 IF -I
/= IDENT_INT
(0)-I
THEN
61 FAILED
("INCORRECT RESULT FOR ""-"" -" &
65 IF "+"(RIGHT
=> IDENT_INT
(I
)) /= I
THEN
66 FAILED
("INCORRECT RESULT FOR ""+"" -" &
71 IF -1 /= IDENT_INT
(1)-2 THEN
72 FAILED
("INCORRECT RESULT FOR ""-"" - 7");
75 IF "-"(RIGHT
=> 0) /= IDENT_INT
(0) THEN
76 FAILED
("INCORRECT RESULT FOR ""-"" - 8");
79 IF "-"(RIGHT
=> "-"(RIGHT
=> 1)) /= IDENT_INT
(1) THEN
80 FAILED
("INCORRECT RESULT FOR ""-"" - 9");
83 IF "+"(RIGHT
=> 1) /= IDENT_INT
(2)-1 THEN
84 FAILED
("INCORRECT RESULT FOR ""+"" - 7");
87 IF +0 /= IDENT_INT
(0) THEN
88 FAILED
("INCORRECT RESULT FOR ""+"" - 8");
91 IF +(-1) /= IDENT_INT
(1)-2 THEN
92 FAILED
("INCORRECT RESULT FOR ""+"" - 9");
95 FOR I
IN (1-2)..INTEGER(1) LOOP
96 IF "-"(RIGHT
=> D1
) /= DT
(IDENT_INT
(I
)) THEN
97 FAILED
("INCORRECT RESULT FOR ""-"" -" &
101 IF +D1
/= DT
(IDENT_INT
(INTEGER(D1
))) THEN
102 FAILED
("INCORRECT RESULT FOR ""+"" -" &
103 INTEGER'IMAGE(I
+11));
108 IF INTEGER'LAST + INTEGER'FIRST = 0 THEN
109 IF IDENT_INT
(-INTEGER'LAST) /= INTEGER'FIRST THEN
110 FAILED
("-INTEGER'LAST IS NOT EQUAL TO INTEGER'FIRST");
113 IF IDENT_INT
(-INTEGER'LAST) /= INTEGER'FIRST+1 THEN
114 FAILED
("-INTEGER'LAST IS NOT EQUAL TO INTEGER'FIRST+1");