annotate gcc/testsuite/ada/acats/tests/cxa/cxa4011.a @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 -- CXA4011.A
kono
parents:
diff changeset
2 --
kono
parents:
diff changeset
3 -- Grant of Unlimited Rights
kono
parents:
diff changeset
4 --
kono
parents:
diff changeset
5 -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
kono
parents:
diff changeset
6 -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
kono
parents:
diff changeset
7 -- unlimited rights in the software and documentation contained herein.
kono
parents:
diff changeset
8 -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
kono
parents:
diff changeset
9 -- this public release, the Government intends to confer upon all
kono
parents:
diff changeset
10 -- recipients unlimited rights equal to those held by the Government.
kono
parents:
diff changeset
11 -- These rights include rights to use, duplicate, release or disclose the
kono
parents:
diff changeset
12 -- released technical data and computer software in whole or in part, in
kono
parents:
diff changeset
13 -- any manner and for any purpose whatsoever, and to have or permit others
kono
parents:
diff changeset
14 -- to do so.
kono
parents:
diff changeset
15 --
kono
parents:
diff changeset
16 -- DISCLAIMER
kono
parents:
diff changeset
17 --
kono
parents:
diff changeset
18 -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
kono
parents:
diff changeset
19 -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
kono
parents:
diff changeset
20 -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
kono
parents:
diff changeset
21 -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
kono
parents:
diff changeset
22 -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
kono
parents:
diff changeset
23 -- PARTICULAR PURPOSE OF SAID MATERIAL.
kono
parents:
diff changeset
24 --*
kono
parents:
diff changeset
25 --
kono
parents:
diff changeset
26 -- OBJECTIVE:
kono
parents:
diff changeset
27 -- Check that the subprograms defined in package Ada.Strings.Unbounded
kono
parents:
diff changeset
28 -- are available, and that they produce correct results. Specifically,
kono
parents:
diff changeset
29 -- check the subprograms To_Unbounded_String, "&", ">", "<", Element,
kono
parents:
diff changeset
30 -- Replace_Element, Count, Find_Token, Translate, Trim, Delete, and
kono
parents:
diff changeset
31 -- "*".
kono
parents:
diff changeset
32 --
kono
parents:
diff changeset
33 -- TEST DESCRIPTION:
kono
parents:
diff changeset
34 -- This test demonstrates the uses of many of the subprograms defined
kono
parents:
diff changeset
35 -- in package Ada.Strings.Unbounded for use with unbounded strings.
kono
parents:
diff changeset
36 -- The test simulates how unbounded strings could be processed in a
kono
parents:
diff changeset
37 -- user environment, using the subprograms provided in this package.
kono
parents:
diff changeset
38 --
kono
parents:
diff changeset
39 -- This test uses a variety of the subprograms defined in the unbounded
kono
parents:
diff changeset
40 -- string package in ways typical of common usage, with different
kono
parents:
diff changeset
41 -- combinations of available subprograms being used to accomplish
kono
parents:
diff changeset
42 -- similar unbounded string processing goals.
kono
parents:
diff changeset
43 --
kono
parents:
diff changeset
44 --
kono
parents:
diff changeset
45 -- CHANGE HISTORY:
kono
parents:
diff changeset
46 -- 06 Dec 94 SAIC ACVC 2.0
kono
parents:
diff changeset
47 -- 27 Feb 95 SAIC Test description modification.
kono
parents:
diff changeset
48 -- 01 Nov 95 SAIC Update and repair for ACVC 2.0.1.
kono
parents:
diff changeset
49 --
kono
parents:
diff changeset
50 --!
kono
parents:
diff changeset
51
kono
parents:
diff changeset
52 with Report;
kono
parents:
diff changeset
53 with Ada.Strings.Maps;
kono
parents:
diff changeset
54 with Ada.Strings.Unbounded;
kono
parents:
diff changeset
55
kono
parents:
diff changeset
56 procedure CXA4011 is
kono
parents:
diff changeset
57 begin
kono
parents:
diff changeset
58
kono
parents:
diff changeset
59 Report.Test ("CXA4011", "Check that the subprograms defined in " &
kono
parents:
diff changeset
60 "package Ada.Strings.Unbounded are available, " &
kono
parents:
diff changeset
61 "and that they produce correct results");
kono
parents:
diff changeset
62
kono
parents:
diff changeset
63 Test_Block:
kono
parents:
diff changeset
64 declare
kono
parents:
diff changeset
65
kono
parents:
diff changeset
66 package ASUnb renames Ada.Strings.Unbounded;
kono
parents:
diff changeset
67 use Ada.Strings;
kono
parents:
diff changeset
68 use type Maps.Character_Set;
kono
parents:
diff changeset
69 use type ASUnb.Unbounded_String;
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 Cad_String : ASUnb.Unbounded_String :=
kono
parents:
diff changeset
72 ASUnb.To_Unbounded_String("cad");
kono
parents:
diff changeset
73
kono
parents:
diff changeset
74 Complete_String : ASUnb.Unbounded_String :=
kono
parents:
diff changeset
75 ASUnb.To_Unbounded_String("Incomplete") &
kono
parents:
diff changeset
76 Ada.Strings.Space &
kono
parents:
diff changeset
77 ASUnb.To_Unbounded_String("String");
kono
parents:
diff changeset
78
kono
parents:
diff changeset
79 Incomplete_String : ASUnb.Unbounded_String :=
kono
parents:
diff changeset
80 ASUnb.To_Unbounded_String("ncomplete Strin");
kono
parents:
diff changeset
81
kono
parents:
diff changeset
82 Incorrect_Spelling : ASUnb.Unbounded_String :=
kono
parents:
diff changeset
83 ASUnb.To_Unbounded_String("Guob Dai");
kono
parents:
diff changeset
84
kono
parents:
diff changeset
85 Magic_String : ASUnb.Unbounded_String :=
kono
parents:
diff changeset
86 ASUnb.To_Unbounded_String("abracadabra");
kono
parents:
diff changeset
87
kono
parents:
diff changeset
88 Incantation : ASUnb.Unbounded_String := Magic_String;
kono
parents:
diff changeset
89
kono
parents:
diff changeset
90
kono
parents:
diff changeset
91 A_Small_G : Character := 'g';
kono
parents:
diff changeset
92 A_Small_D : Character := 'd';
kono
parents:
diff changeset
93
kono
parents:
diff changeset
94 ABCD_Set : Maps.Character_Set := Maps.To_Set("abcd");
kono
parents:
diff changeset
95 B_Set : Maps.Character_Set := Maps.To_Set('b');
kono
parents:
diff changeset
96 AB_Set : Maps.Character_Set := Maps."OR"(Maps.To_Set('a'), B_Set);
kono
parents:
diff changeset
97
kono
parents:
diff changeset
98 Code_Map : Maps.Character_Mapping :=
kono
parents:
diff changeset
99 Maps.To_Mapping(From => "abcd", To => "wxyz");
kono
parents:
diff changeset
100 Reverse_Code_Map : Maps.Character_Mapping :=
kono
parents:
diff changeset
101 Maps.To_Mapping(From => "wxyz", To => "abcd");
kono
parents:
diff changeset
102 Non_Existent_Map : Maps.Character_Mapping :=
kono
parents:
diff changeset
103 Maps.To_Mapping(From => "jkl", To => "mno");
kono
parents:
diff changeset
104
kono
parents:
diff changeset
105
kono
parents:
diff changeset
106 Token_Start : Positive;
kono
parents:
diff changeset
107 Token_End : Natural := 0;
kono
parents:
diff changeset
108 Matching_Letters : Natural := 0;
kono
parents:
diff changeset
109
kono
parents:
diff changeset
110
kono
parents:
diff changeset
111 begin
kono
parents:
diff changeset
112
kono
parents:
diff changeset
113 -- "&"
kono
parents:
diff changeset
114
kono
parents:
diff changeset
115 -- Prepend an 'I' and append a 'g' to the string.
kono
parents:
diff changeset
116 Incomplete_String := ASUnb."&"('I', Incomplete_String); -- Char & Unb
kono
parents:
diff changeset
117 Incomplete_String := ASUnb."&"(Incomplete_String,
kono
parents:
diff changeset
118 A_Small_G); -- Unb & Char
kono
parents:
diff changeset
119
kono
parents:
diff changeset
120 if Incomplete_String < Complete_String or
kono
parents:
diff changeset
121 Incomplete_String > Complete_String or
kono
parents:
diff changeset
122 Incomplete_String /= Complete_String
kono
parents:
diff changeset
123 then
kono
parents:
diff changeset
124 Report.Failed("Incorrect result from use of ""&"" operator");
kono
parents:
diff changeset
125 end if;
kono
parents:
diff changeset
126
kono
parents:
diff changeset
127
kono
parents:
diff changeset
128 -- Element
kono
parents:
diff changeset
129
kono
parents:
diff changeset
130 -- Last element of the unbounded string should be a 'g'.
kono
parents:
diff changeset
131 if ASUnb.Element(Incomplete_String, ASUnb.Length(Incomplete_String)) /=
kono
parents:
diff changeset
132 A_Small_G
kono
parents:
diff changeset
133 then
kono
parents:
diff changeset
134 Report.Failed("Incorrect result from use of Function Element - 1");
kono
parents:
diff changeset
135 end if;
kono
parents:
diff changeset
136
kono
parents:
diff changeset
137 if ASUnb.Element(Incomplete_String, 2) /=
kono
parents:
diff changeset
138 ASUnb.Element(ASUnb.Tail(Incomplete_String, 2), 1) or
kono
parents:
diff changeset
139 ASUnb.Element(ASUnb.Head(Incomplete_String, 4), 2) /=
kono
parents:
diff changeset
140 ASUnb.Element(ASUnb.To_Unbounded_String("wnqz"), 2)
kono
parents:
diff changeset
141 then
kono
parents:
diff changeset
142 Report.Failed("Incorrect result from use of Function Element - 2");
kono
parents:
diff changeset
143 end if;
kono
parents:
diff changeset
144
kono
parents:
diff changeset
145
kono
parents:
diff changeset
146 -- Replace_Element
kono
parents:
diff changeset
147
kono
parents:
diff changeset
148 -- The unbounded string Incorrect_Spelling starts as "Guob Dai", and
kono
parents:
diff changeset
149 -- is transformed by the following three procedure calls to "Good Day".
kono
parents:
diff changeset
150
kono
parents:
diff changeset
151 ASUnb.Replace_Element(Incorrect_Spelling, 2, 'o');
kono
parents:
diff changeset
152
kono
parents:
diff changeset
153 ASUnb.Replace_Element(Incorrect_Spelling,
kono
parents:
diff changeset
154 ASUnb.Index(Incorrect_Spelling, B_Set),
kono
parents:
diff changeset
155 A_Small_D);
kono
parents:
diff changeset
156
kono
parents:
diff changeset
157 ASUnb.Replace_Element(Source => Incorrect_Spelling,
kono
parents:
diff changeset
158 Index => ASUnb.Length(Incorrect_Spelling),
kono
parents:
diff changeset
159 By => 'y');
kono
parents:
diff changeset
160
kono
parents:
diff changeset
161 if Incorrect_Spelling /= ASUnb.To_Unbounded_String("Good Day") then
kono
parents:
diff changeset
162 Report.Failed("Incorrect result from Procedure Replace_Element");
kono
parents:
diff changeset
163 end if;
kono
parents:
diff changeset
164
kono
parents:
diff changeset
165
kono
parents:
diff changeset
166 -- Count
kono
parents:
diff changeset
167
kono
parents:
diff changeset
168 -- Determine the number of characters in the unbounded string that
kono
parents:
diff changeset
169 -- are contained in the set.
kono
parents:
diff changeset
170
kono
parents:
diff changeset
171 Matching_Letters := ASUnb.Count(Source => Magic_String,
kono
parents:
diff changeset
172 Set => ABCD_Set);
kono
parents:
diff changeset
173
kono
parents:
diff changeset
174 if Matching_Letters /= 9 then
kono
parents:
diff changeset
175 Report.Failed
kono
parents:
diff changeset
176 ("Incorrect result from Function Count with Set parameter");
kono
parents:
diff changeset
177 end if;
kono
parents:
diff changeset
178
kono
parents:
diff changeset
179 -- Determine the number of occurrences of the following pattern strings
kono
parents:
diff changeset
180 -- in the unbounded string Magic_String.
kono
parents:
diff changeset
181
kono
parents:
diff changeset
182 if ASUnb.Count(Magic_String, "ab") /=
kono
parents:
diff changeset
183 (ASUnb.Count(Magic_String, "ac") + ASUnb.Count(Magic_String, "ad")) or
kono
parents:
diff changeset
184 ASUnb.Count(Magic_String, "ab") /= 2
kono
parents:
diff changeset
185 then
kono
parents:
diff changeset
186 Report.Failed
kono
parents:
diff changeset
187 ("Incorrect result from Function Count with String parameter");
kono
parents:
diff changeset
188 end if;
kono
parents:
diff changeset
189
kono
parents:
diff changeset
190
kono
parents:
diff changeset
191 -- Find_Token
kono
parents:
diff changeset
192
kono
parents:
diff changeset
193 ASUnb.Find_Token(Magic_String, -- Find location of first "ab".
kono
parents:
diff changeset
194 AB_Set, -- Should be (1..2).
kono
parents:
diff changeset
195 Ada.Strings.Inside,
kono
parents:
diff changeset
196 Token_Start,
kono
parents:
diff changeset
197 Token_End);
kono
parents:
diff changeset
198
kono
parents:
diff changeset
199 if Natural(Token_Start) /= ASUnb.To_String(Magic_String)'First or
kono
parents:
diff changeset
200 Token_End /= ASUnb.Index(Magic_String, B_Set)
kono
parents:
diff changeset
201 then
kono
parents:
diff changeset
202 Report.Failed("Incorrect result from Procedure Find_Token - 1");
kono
parents:
diff changeset
203 end if;
kono
parents:
diff changeset
204
kono
parents:
diff changeset
205
kono
parents:
diff changeset
206 ASUnb.Find_Token(Source => Magic_String, -- Find location of char 'r'
kono
parents:
diff changeset
207 Set => ABCD_Set, -- in string, should be (3..3)
kono
parents:
diff changeset
208 Test => Ada.Strings.Outside,
kono
parents:
diff changeset
209 First => Token_Start,
kono
parents:
diff changeset
210 Last => Token_End);
kono
parents:
diff changeset
211
kono
parents:
diff changeset
212 if Natural(Token_Start) /= 3 or
kono
parents:
diff changeset
213 Token_End /= 3 then
kono
parents:
diff changeset
214 Report.Failed("Incorrect result from Procedure Find_Token - 2");
kono
parents:
diff changeset
215 end if;
kono
parents:
diff changeset
216
kono
parents:
diff changeset
217
kono
parents:
diff changeset
218 ASUnb.Find_Token(Magic_String, -- No 'g' is in the string, so
kono
parents:
diff changeset
219 Maps.To_Set(A_Small_G), -- the result parameters should
kono
parents:
diff changeset
220 Ada.Strings.Inside, -- be First = Source'First and
kono
parents:
diff changeset
221 First => Token_Start, -- Last = 0.
kono
parents:
diff changeset
222 Last => Token_End);
kono
parents:
diff changeset
223
kono
parents:
diff changeset
224 if Token_Start /= ASUnb.To_String(Magic_String)'First or
kono
parents:
diff changeset
225 Token_End /= 0
kono
parents:
diff changeset
226 then
kono
parents:
diff changeset
227 Report.Failed("Incorrect result from Procedure Find_Token - 3");
kono
parents:
diff changeset
228 end if;
kono
parents:
diff changeset
229
kono
parents:
diff changeset
230
kono
parents:
diff changeset
231 -- Translate
kono
parents:
diff changeset
232
kono
parents:
diff changeset
233 -- Use a mapping ("abcd" -> "wxyz") to transform the contents of
kono
parents:
diff changeset
234 -- the unbounded string.
kono
parents:
diff changeset
235 -- Magic_String = "abracadabra"
kono
parents:
diff changeset
236
kono
parents:
diff changeset
237 Incantation := ASUnb.Translate(Magic_String, Code_Map);
kono
parents:
diff changeset
238
kono
parents:
diff changeset
239 if Incantation /= ASUnb.To_Unbounded_String("wxrwywzwxrw") then
kono
parents:
diff changeset
240 Report.Failed("Incorrect result from Function Translate");
kono
parents:
diff changeset
241 end if;
kono
parents:
diff changeset
242
kono
parents:
diff changeset
243 -- Use the inverse mapping of the one above to return the "translated"
kono
parents:
diff changeset
244 -- unbounded string to its original form.
kono
parents:
diff changeset
245
kono
parents:
diff changeset
246 ASUnb.Translate(Incantation, Reverse_Code_Map);
kono
parents:
diff changeset
247
kono
parents:
diff changeset
248 -- The map contained in the following call to Translate contains one
kono
parents:
diff changeset
249 -- element, and this element is not found in the unbounded string, so
kono
parents:
diff changeset
250 -- this call to Translate should have no effect on the unbounded string.
kono
parents:
diff changeset
251
kono
parents:
diff changeset
252 if Incantation /= ASUnb.Translate(Magic_String, Non_Existent_Map) then
kono
parents:
diff changeset
253 Report.Failed("Incorrect result from Procedure Translate");
kono
parents:
diff changeset
254 end if;
kono
parents:
diff changeset
255
kono
parents:
diff changeset
256
kono
parents:
diff changeset
257 -- Trim
kono
parents:
diff changeset
258
kono
parents:
diff changeset
259 Trim_Block:
kono
parents:
diff changeset
260 declare
kono
parents:
diff changeset
261
kono
parents:
diff changeset
262 XYZ_Set : Maps.Character_Set := Maps.To_Set("xyz");
kono
parents:
diff changeset
263 PQR_Set : Maps.Character_Set := Maps.To_Set("pqr");
kono
parents:
diff changeset
264
kono
parents:
diff changeset
265 Pad : constant ASUnb.Unbounded_String :=
kono
parents:
diff changeset
266 ASUnb.To_Unbounded_String("Pad");
kono
parents:
diff changeset
267
kono
parents:
diff changeset
268 The_New_Ada : constant ASUnb.Unbounded_String :=
kono
parents:
diff changeset
269 ASUnb.To_Unbounded_String("Ada9X");
kono
parents:
diff changeset
270
kono
parents:
diff changeset
271 Space_Array : array (1..4) of ASUnb.Unbounded_String :=
kono
parents:
diff changeset
272 (ASUnb.To_Unbounded_String(" Pad "),
kono
parents:
diff changeset
273 ASUnb.To_Unbounded_String("Pad "),
kono
parents:
diff changeset
274 ASUnb.To_Unbounded_String(" Pad"),
kono
parents:
diff changeset
275 Pad);
kono
parents:
diff changeset
276
kono
parents:
diff changeset
277 String_Array : array (1..5) of ASUnb.Unbounded_String :=
kono
parents:
diff changeset
278 (ASUnb.To_Unbounded_String("xyzxAda9Xpqr"),
kono
parents:
diff changeset
279 ASUnb.To_Unbounded_String("Ada9Xqqrp"),
kono
parents:
diff changeset
280 ASUnb.To_Unbounded_String("zxyxAda9Xqpqr"),
kono
parents:
diff changeset
281 ASUnb.To_Unbounded_String("xxxyAda9X"),
kono
parents:
diff changeset
282 The_New_Ada);
kono
parents:
diff changeset
283
kono
parents:
diff changeset
284 begin
kono
parents:
diff changeset
285
kono
parents:
diff changeset
286 -- Examine the version of Trim that removes blanks from
kono
parents:
diff changeset
287 -- the left and/or right of a string.
kono
parents:
diff changeset
288
kono
parents:
diff changeset
289 for i in 1..4 loop
kono
parents:
diff changeset
290 if ASUnb.Trim(Space_Array(i), Ada.Strings.Both) /= Pad then
kono
parents:
diff changeset
291 Report.Failed("Incorrect result from Trim for spaces - " &
kono
parents:
diff changeset
292 Integer'Image(i));
kono
parents:
diff changeset
293 end if;
kono
parents:
diff changeset
294 end loop;
kono
parents:
diff changeset
295
kono
parents:
diff changeset
296 -- Examine the version of Trim that removes set characters from
kono
parents:
diff changeset
297 -- the left and right of a string.
kono
parents:
diff changeset
298
kono
parents:
diff changeset
299 for i in 1..5 loop
kono
parents:
diff changeset
300 if ASUnb.Trim(String_Array(i),
kono
parents:
diff changeset
301 Left => XYZ_Set,
kono
parents:
diff changeset
302 Right => PQR_Set) /= The_New_Ada then
kono
parents:
diff changeset
303 Report.Failed
kono
parents:
diff changeset
304 ("Incorrect result from Trim for set characters - " &
kono
parents:
diff changeset
305 Integer'Image(i));
kono
parents:
diff changeset
306 end if;
kono
parents:
diff changeset
307 end loop;
kono
parents:
diff changeset
308
kono
parents:
diff changeset
309 end Trim_Block;
kono
parents:
diff changeset
310
kono
parents:
diff changeset
311
kono
parents:
diff changeset
312 -- Delete
kono
parents:
diff changeset
313
kono
parents:
diff changeset
314 -- Use the Delete function to remove the first four and last four
kono
parents:
diff changeset
315 -- characters from the string.
kono
parents:
diff changeset
316
kono
parents:
diff changeset
317 if ASUnb.Delete(Source => ASUnb.Delete(Magic_String,
kono
parents:
diff changeset
318 8,
kono
parents:
diff changeset
319 ASUnb.Length(Magic_String)),
kono
parents:
diff changeset
320 From => ASUnb.To_String(Magic_String)'First,
kono
parents:
diff changeset
321 Through => 4) /=
kono
parents:
diff changeset
322 Cad_String
kono
parents:
diff changeset
323 then
kono
parents:
diff changeset
324 Report.Failed("Incorrect results from Function Delete");
kono
parents:
diff changeset
325 end if;
kono
parents:
diff changeset
326
kono
parents:
diff changeset
327
kono
parents:
diff changeset
328 -- Constructors ("*")
kono
parents:
diff changeset
329
kono
parents:
diff changeset
330 Constructor_Block:
kono
parents:
diff changeset
331 declare
kono
parents:
diff changeset
332
kono
parents:
diff changeset
333 SOS : ASUnb.Unbounded_String;
kono
parents:
diff changeset
334
kono
parents:
diff changeset
335 Dot : constant ASUnb.Unbounded_String :=
kono
parents:
diff changeset
336 ASUnb.To_Unbounded_String("Dot_");
kono
parents:
diff changeset
337 Dash : constant String := "Dash_";
kono
parents:
diff changeset
338
kono
parents:
diff changeset
339 Distress : ASUnb.Unbounded_String :=
kono
parents:
diff changeset
340 ASUnb.To_Unbounded_String("Dot_Dot_Dot_") &
kono
parents:
diff changeset
341 ASUnb.To_Unbounded_String("Dash_Dash_Dash_") &
kono
parents:
diff changeset
342 ASUnb.To_Unbounded_String("Dot_Dot_Dot");
kono
parents:
diff changeset
343
kono
parents:
diff changeset
344 Repeat : constant Natural := 3;
kono
parents:
diff changeset
345 Separator : constant Character := '_';
kono
parents:
diff changeset
346
kono
parents:
diff changeset
347 Separator_Set : Maps.Character_Set := Maps.To_Set(Separator);
kono
parents:
diff changeset
348
kono
parents:
diff changeset
349 begin
kono
parents:
diff changeset
350
kono
parents:
diff changeset
351 -- Use the following constructor forms to construct the string
kono
parents:
diff changeset
352 -- "Dot_Dot_Dot_Dash_Dash_Dash_Dot_Dot_Dot". Note that the
kono
parents:
diff changeset
353 -- trailing underscore in the string is removed in the call to
kono
parents:
diff changeset
354 -- Trim in the If statement condition.
kono
parents:
diff changeset
355
kono
parents:
diff changeset
356 SOS := ASUnb."*"(Repeat, Dot); -- "*"(#, Unb Str)
kono
parents:
diff changeset
357
kono
parents:
diff changeset
358 SOS := SOS &
kono
parents:
diff changeset
359 ASUnb."*"(Repeat, Dash) & -- "*"(#, Str)
kono
parents:
diff changeset
360 ASUnb."*"(Repeat, Dot); -- "*"(#, Unb Str)
kono
parents:
diff changeset
361
kono
parents:
diff changeset
362 if ASUnb.Trim(SOS, Maps.Null_Set, Separator_Set) /= Distress then
kono
parents:
diff changeset
363 Report.Failed("Incorrect results from Function ""*""");
kono
parents:
diff changeset
364 end if;
kono
parents:
diff changeset
365
kono
parents:
diff changeset
366 end Constructor_Block;
kono
parents:
diff changeset
367
kono
parents:
diff changeset
368
kono
parents:
diff changeset
369 exception
kono
parents:
diff changeset
370 when others => Report.Failed ("Exception raised in Test_Block");
kono
parents:
diff changeset
371 end Test_Block;
kono
parents:
diff changeset
372
kono
parents:
diff changeset
373
kono
parents:
diff changeset
374 Report.Result;
kono
parents:
diff changeset
375
kono
parents:
diff changeset
376 end CXA4011;