1 |
149 |
jeremybenn |
-- C45220B.ADA
|
2 |
|
|
|
3 |
|
|
-- Grant of Unlimited Rights
|
4 |
|
|
--
|
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
|
14 |
|
|
-- to do so.
|
15 |
|
|
--
|
16 |
|
|
-- DISCLAIMER
|
17 |
|
|
--
|
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.
|
24 |
|
|
--*
|
25 |
|
|
-- CHECK THAT '<' , '<=' , '>' , '>=' PRODUCE CORRECT RESULTS ON
|
26 |
|
|
-- BOOLEAN-TYPE OPERANDS (IN PARTICULAR, FOR OPERANDS HAVING
|
27 |
|
|
-- DIFFERENT SUBTYPES).
|
28 |
|
|
|
29 |
|
|
-- THIS TEST IS DERIVED FROM C45220A.ADA .
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
-- RM 28 OCTOBER 1980
|
33 |
|
|
-- JWC 7/8/85 RENAMED TO -AB
|
34 |
|
|
|
35 |
|
|
|
36 |
|
|
WITH REPORT ;
|
37 |
|
|
PROCEDURE C45220B IS
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
USE REPORT;
|
41 |
|
|
|
42 |
|
|
SUBTYPE T1 IS BOOLEAN RANGE FALSE..FALSE ;
|
43 |
|
|
SUBTYPE T2 IS BOOLEAN RANGE TRUE..TRUE ;
|
44 |
|
|
SUBTYPE T3 IS BOOLEAN RANGE FALSE..TRUE ;
|
45 |
|
|
SUBTYPE T4 IS T3 RANGE TRUE..TRUE ;
|
46 |
|
|
|
47 |
|
|
FVAR1 : T1 := FALSE ;
|
48 |
|
|
TVAR1 : T2 := TRUE ;
|
49 |
|
|
FVAR2 : T3 := FALSE ;
|
50 |
|
|
TVAR2 : T4 := TRUE ;
|
51 |
|
|
|
52 |
|
|
ERROR_COUNT : INTEGER := 0 ;
|
53 |
|
|
|
54 |
|
|
PROCEDURE BUMP IS
|
55 |
|
|
BEGIN
|
56 |
|
|
ERROR_COUNT := ERROR_COUNT + 1 ;
|
57 |
|
|
END BUMP ;
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
BEGIN
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
TEST( "C45220B" , "CHECK THAT '<' , '<=' , '>' , '>=' PRODUCE" &
|
64 |
|
|
" CORRECT RESULTS ON BOOLEAN-TYPE OPERANDS" ) ;
|
65 |
|
|
|
66 |
|
|
-- 64 CASES ( 2 * 2 ORDERED PAIRS OF OPERAND VALUES,
|
67 |
|
|
-- 4 OPERATORS : '<' , <=' , '>' , '>='
|
68 |
|
|
-- 4 VARIABLE/LITERAL FOR LEFT OPERAND,
|
69 |
|
|
-- VARIABLE/LITERAL FOR RIGHT OPERAND.
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
-- 'BUMP' MEANS 'BUMP THE ERROR COUNT'
|
73 |
|
|
|
74 |
|
|
FVAR1 := IDENT_BOOL( FALSE ) ;
|
75 |
|
|
TVAR1 := IDENT_BOOL( TRUE ) ;
|
76 |
|
|
FVAR2 := IDENT_BOOL( FALSE ) ;
|
77 |
|
|
TVAR2 := IDENT_BOOL( TRUE ) ;
|
78 |
|
|
|
79 |
|
|
|
80 |
|
|
ERROR_COUNT := 0 ;
|
81 |
|
|
|
82 |
|
|
IF FALSE < FALSE THEN BUMP ; END IF;
|
83 |
|
|
IF FVAR1 < FALSE THEN BUMP ; END IF;
|
84 |
|
|
IF FALSE < FVAR2 THEN BUMP ; END IF;
|
85 |
|
|
IF FVAR2 < FVAR1 THEN BUMP ; END IF;
|
86 |
|
|
|
87 |
|
|
IF FALSE < TRUE THEN NULL ; ELSE BUMP ; END IF;
|
88 |
|
|
IF FVAR1 < TRUE THEN NULL ; ELSE BUMP ; END IF;
|
89 |
|
|
IF FALSE < TVAR2 THEN NULL ; ELSE BUMP ; END IF;
|
90 |
|
|
IF FVAR2 < TVAR1 THEN NULL ; ELSE BUMP ; END IF;
|
91 |
|
|
|
92 |
|
|
IF TRUE < FALSE THEN BUMP ; END IF;
|
93 |
|
|
IF TRUE < FVAR1 THEN BUMP ; END IF;
|
94 |
|
|
IF TVAR2 < FALSE THEN BUMP ; END IF;
|
95 |
|
|
IF TVAR1 < FVAR2 THEN BUMP ; END IF;
|
96 |
|
|
|
97 |
|
|
IF TRUE < TRUE THEN BUMP ; END IF;
|
98 |
|
|
IF TVAR1 < TRUE THEN BUMP ; END IF;
|
99 |
|
|
IF TRUE < TVAR2 THEN BUMP ; END IF;
|
100 |
|
|
IF TVAR2 < TVAR1 THEN BUMP ; END IF;
|
101 |
|
|
|
102 |
|
|
IF ERROR_COUNT > 0 THEN
|
103 |
|
|
FAILED( "ORDERING OF BOOLEAN VALUES - FAILURE '<'" );
|
104 |
|
|
END IF;
|
105 |
|
|
|
106 |
|
|
|
107 |
|
|
ERROR_COUNT := 0 ;
|
108 |
|
|
|
109 |
|
|
IF FALSE <= FALSE THEN NULL ; ELSE BUMP ; END IF;
|
110 |
|
|
IF FVAR1 <= FALSE THEN NULL ; ELSE BUMP ; END IF;
|
111 |
|
|
IF FALSE <= FVAR2 THEN NULL ; ELSE BUMP ; END IF;
|
112 |
|
|
IF FVAR2 <= FVAR1 THEN NULL ; ELSE BUMP ; END IF;
|
113 |
|
|
|
114 |
|
|
IF FALSE <= TRUE THEN NULL ; ELSE BUMP ; END IF;
|
115 |
|
|
IF FVAR1 <= TRUE THEN NULL ; ELSE BUMP ; END IF;
|
116 |
|
|
IF FALSE <= TVAR2 THEN NULL ; ELSE BUMP ; END IF;
|
117 |
|
|
IF FVAR2 <= TVAR1 THEN NULL ; ELSE BUMP ; END IF;
|
118 |
|
|
|
119 |
|
|
IF TRUE <= FALSE THEN BUMP ; END IF;
|
120 |
|
|
IF TRUE <= FVAR1 THEN BUMP ; END IF;
|
121 |
|
|
IF TVAR2 <= FALSE THEN BUMP ; END IF;
|
122 |
|
|
IF TVAR1 <= FVAR2 THEN BUMP ; END IF;
|
123 |
|
|
|
124 |
|
|
IF TRUE <= TRUE THEN NULL ; ELSE BUMP ; END IF;
|
125 |
|
|
IF TVAR1 <= TRUE THEN NULL ; ELSE BUMP ; END IF;
|
126 |
|
|
IF TRUE <= TVAR2 THEN NULL ; ELSE BUMP ; END IF;
|
127 |
|
|
IF TVAR2 <= TVAR1 THEN NULL ; ELSE BUMP ; END IF;
|
128 |
|
|
|
129 |
|
|
IF ERROR_COUNT > 0 THEN
|
130 |
|
|
FAILED( "ORDERING OF BOOLEAN VALUES - FAILURE '<='" );
|
131 |
|
|
END IF;
|
132 |
|
|
|
133 |
|
|
|
134 |
|
|
ERROR_COUNT := 0 ;
|
135 |
|
|
|
136 |
|
|
IF FALSE > FALSE THEN BUMP ; END IF;
|
137 |
|
|
IF FVAR1 > FALSE THEN BUMP ; END IF;
|
138 |
|
|
IF FALSE > FVAR2 THEN BUMP ; END IF;
|
139 |
|
|
IF FVAR2 > FVAR1 THEN BUMP ; END IF;
|
140 |
|
|
|
141 |
|
|
IF FALSE > TRUE THEN BUMP ; END IF;
|
142 |
|
|
IF FVAR1 > TRUE THEN BUMP ; END IF;
|
143 |
|
|
IF FALSE > TVAR2 THEN BUMP ; END IF;
|
144 |
|
|
IF FVAR2 > TVAR1 THEN BUMP ; END IF;
|
145 |
|
|
|
146 |
|
|
IF TRUE > FALSE THEN NULL ; ELSE BUMP ; END IF;
|
147 |
|
|
IF TRUE > FVAR1 THEN NULL ; ELSE BUMP ; END IF;
|
148 |
|
|
IF TVAR2 > FALSE THEN NULL ; ELSE BUMP ; END IF;
|
149 |
|
|
IF TVAR1 > FVAR2 THEN NULL ; ELSE BUMP ; END IF;
|
150 |
|
|
|
151 |
|
|
IF TRUE > TRUE THEN BUMP ; END IF;
|
152 |
|
|
IF TVAR1 > TRUE THEN BUMP ; END IF;
|
153 |
|
|
IF TRUE > TVAR2 THEN BUMP ; END IF;
|
154 |
|
|
IF TVAR2 > TVAR1 THEN BUMP ; END IF;
|
155 |
|
|
|
156 |
|
|
IF ERROR_COUNT > 0 THEN
|
157 |
|
|
FAILED( "ORDERING OF BOOLEAN VALUES - FAILURE '>'" );
|
158 |
|
|
END IF;
|
159 |
|
|
|
160 |
|
|
|
161 |
|
|
ERROR_COUNT := 0 ;
|
162 |
|
|
|
163 |
|
|
IF FALSE >= FALSE THEN NULL ; ELSE BUMP ; END IF;
|
164 |
|
|
IF FVAR1 >= FALSE THEN NULL ; ELSE BUMP ; END IF;
|
165 |
|
|
IF FALSE >= FVAR2 THEN NULL ; ELSE BUMP ; END IF;
|
166 |
|
|
IF FVAR2 >= FVAR1 THEN NULL ; ELSE BUMP ; END IF;
|
167 |
|
|
|
168 |
|
|
IF FALSE >= TRUE THEN BUMP ; END IF;
|
169 |
|
|
IF FVAR1 >= TRUE THEN BUMP ; END IF;
|
170 |
|
|
IF FALSE >= TVAR2 THEN BUMP ; END IF;
|
171 |
|
|
IF FVAR2 >= TVAR1 THEN BUMP ; END IF;
|
172 |
|
|
|
173 |
|
|
IF TRUE >= FALSE THEN NULL ; ELSE BUMP ; END IF;
|
174 |
|
|
IF TRUE >= FVAR1 THEN NULL ; ELSE BUMP ; END IF;
|
175 |
|
|
IF TVAR2 >= FALSE THEN NULL ; ELSE BUMP ; END IF;
|
176 |
|
|
IF TVAR1 >= FVAR2 THEN NULL ; ELSE BUMP ; END IF;
|
177 |
|
|
|
178 |
|
|
IF TRUE >= TRUE THEN NULL ; ELSE BUMP ; END IF;
|
179 |
|
|
IF TVAR1 >= TRUE THEN NULL ; ELSE BUMP ; END IF;
|
180 |
|
|
IF TRUE >= TVAR2 THEN NULL ; ELSE BUMP ; END IF;
|
181 |
|
|
IF TVAR2 >= TVAR1 THEN NULL ; ELSE BUMP ; END IF;
|
182 |
|
|
|
183 |
|
|
IF ERROR_COUNT > 0 THEN
|
184 |
|
|
FAILED( "ORDERING OF BOOLEAN VALUES - FAILURE '>='" );
|
185 |
|
|
END IF;
|
186 |
|
|
|
187 |
|
|
|
188 |
|
|
RESULT ;
|
189 |
|
|
|
190 |
|
|
|
191 |
|
|
END C45220B;
|