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 FOR CORRECT PRECEDENCE OF PRE-DEFINED AND OVERLOADED
27 -- OPERATIONS ON BOOLEAN TYPES AND ONE-DIMENSIONAL ARRAYS WITH
28 -- COMPONENTS OF TYPE BOOLEAN.
31 -- RJW 10/13/88 CREATED ORIGINAL TEST.
33 WITH REPORT
; USE REPORT
;
37 TEST
("C44003G", "CHECK FOR CORRECT PRECEDENCE OF PRE-DEFINED " &
38 "AND OVERLOADED OPERATIONS ON BOOLEAN TYPES " &
39 "AND ONE-DIMENSIONAL ARRAYS WITH COMPONENTS OF " &
42 ----- PREDEFINED BOOLEAN:
48 FUNCTION "AND" (LEFT
, RIGHT
: BOOLEAN) RETURN BOOLEAN IS
53 FUNCTION "<" (LEFT
, RIGHT
: BOOLEAN) RETURN BOOLEAN IS
58 FUNCTION "-" (LEFT
, RIGHT
: BOOLEAN) RETURN BOOLEAN IS
63 FUNCTION "+" (RIGHT
: BOOLEAN) RETURN BOOLEAN IS
68 FUNCTION "*" (LEFT
, RIGHT
: BOOLEAN) RETURN BOOLEAN IS
73 FUNCTION "**" (LEFT
, RIGHT
: BOOLEAN) RETURN BOOLEAN IS
79 IF NOT (+T
= F
) OR T
/= +F
OR (TRUE AND FALSE ** TRUE) OR
80 NOT (+T
< F
) OR NOT (T
- F
* T
) OR (NOT T
- F
XOR + F
- F
)
82 FAILED
("INCORRECT RESULT - 1");
90 TYPE ARR
IS ARRAY (INTEGER RANGE <>) OF BOOLEAN;
92 SUBTYPE SARR
IS ARR
(1 .. 3);
94 T
: SARR
:= (OTHERS => TRUE);
95 F
: SARR
:= (OTHERS => FALSE);
97 FUNCTION "XOR" (LEFT
, RIGHT
: ARR
) RETURN ARR
IS
99 RETURN (1 .. 3 => FALSE);
102 FUNCTION "<=" (LEFT
, RIGHT
: ARR
) RETURN ARR
IS
104 RETURN (1 .. 3 => TRUE);
107 FUNCTION "+" (LEFT
, RIGHT
: ARR
) RETURN ARR
IS
109 RETURN (1 .. 3 => FALSE);
112 FUNCTION "MOD" (LEFT
, RIGHT
: ARR
) RETURN ARR
IS
114 RETURN (1 .. 3 => TRUE);
117 FUNCTION "**" (LEFT
, RIGHT
: ARR
) RETURN ARR
IS
119 RETURN (1 .. 3 => FALSE);
122 IF (F
** T
<= F
+ T
MOD T
XOR T
) /= (1 .. 3 => FALSE)
124 FAILED
("INCORRECT RESULT - 2");
127 IF F
** T
& T
/= NOT T
& T
OR
128 (T
MOD F
<= T
) /= (1 .. 3 => TRUE) THEN
129 FAILED
("INCORRECT RESULT - 3");