Skip to content

Commit bff21ed

Browse files
Anthony WilliamsAnthony Williams
Anthony Williams
authored and
Anthony Williams
committedMay 6, 2020
Tidy down to one file.
1 parent 17bdacf commit bff21ed

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed
 

‎day3-reproducer/repro.adb

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
1+
with Ada.Containers.Formal_Vectors;
12
with Ada.Text_IO;
23

3-
with Coord;
4-
54
procedure Repro
65
with SPARK_Mode => On
76
is
87

8+
package Points is new Ada.Containers.Formal_Vectors
9+
(Element_Type => Natural,
10+
Index_Type => Natural);
11+
912
-- Instantiate Vec_2 to have a Capacity of 200.
10-
Vec_2 : Coord.Points.Vector (200);
13+
Vec_2 : Points.Vector (200);
1114

1215
Pos : constant Natural := 12345;
1316

1417
begin
1518

1619
-- Fails SPARK analysis, but we knew that was going to happen...
1720
for J in Positive range 1 .. 40005 loop
18-
Coord.Points.Append(Vec_2, Pos);
19-
Ada.Text_IO.Put_Line ("Vector Append" & Coord.Points.Length(Vec_2)'Image);
21+
Points.Append(Vec_2, Pos);
22+
Ada.Text_IO.Put_Line ("Vector Append" & Points.Length(Vec_2)'Image);
2023
end loop;
2124

2225
Ada.Text_IO.Put_Line
23-
("Vector Finished" & Coord.Points.Length(Vec_2)'Image);
26+
("Vector Finished" & Points.Length(Vec_2)'Image);
2427

2528
end Repro;

0 commit comments

Comments
 (0)
Please sign in to comment.