Skip to content

Commit 50874f4

Browse files
committed
Test case.
1 parent 55ebb2b commit 50874f4

File tree

3 files changed

+146
-0
lines changed

3 files changed

+146
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
pragma Ada_2022;
2+
3+
package PA is
4+
5+
A : array (1 .. 5) of Integer := [1, 2, 3, 4, 5];
6+
-- Anonymous: Code snippet contains complete initialization expression.
7+
8+
B : array (1 .. 5) of Integer :=
9+
[1,
10+
2,
11+
3,
12+
4,
13+
5];
14+
-- Anonymous Code snippet contains few items of initialization expression.
15+
16+
type Integer_Array is array (Positive range <>) of Integer;
17+
18+
IA : Integer_Array (1 .. 5) := [1, 2, 3, 4, 5];
19+
-- Variable: Code snippet contains complete initialization expression.
20+
IB : constant Integer_Array (1 .. 5) := [1, 2, 3, 4, 5];
21+
-- Constant: Code snippet contains complete initialization expression.
22+
23+
IC : Integer_Array (1 .. 5) :=
24+
[1,
25+
2,
26+
3,
27+
4,
28+
5];
29+
-- Variable: Code snippet contains few items of initialization expression.
30+
ID : constant Integer_Array (1 .. 5) :=
31+
[1,
32+
2,
33+
3,
34+
4,
35+
5];
36+
-- Constant: Code snippet contains few items of initialization expression.
37+
38+
end PA;
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<CompilationUnit arrays.ads:1:1-38:8>
2+
<AdaNodeList arrays.ads:1:1-1:17>
3+
<PragmaNode arrays.ads:1:1-1:17>
4+
<Id "Ada_2022" arrays.ads:1:8-1:16>
5+
<BaseAssocList arrays.ads:1:16-1:16>
6+
<LibraryItem arrays.ads:3:1-38:8>
7+
<PrivateAbsent arrays.ads:1:17-1:17>
8+
<PackageDecl ["PA"] arrays.ads:3:1-38:8>
9+
**************************
10+
\/ RAW <<HEADER>> ()
11+
\/ RAW <<LEADING>> ()
12+
\/ RAW <<INTERMEDIATE UPPER>> ()
13+
\/ SNIPPET ada ()
14+
package PA
15+
\/ DESCRIPTION ()
16+
**************************
17+
<DefiningName "PA" arrays.ads:3:9-3:11>
18+
<Id "PA" arrays.ads:3:9-3:11>
19+
<PublicPart arrays.ads:3:14-38:1>
20+
<AdaNodeList arrays.ads:5:4-35:10>
21+
<ObjectDecl ["A"] arrays.ads:5:4-5:53>
22+
**************************
23+
\/ RAW <<LEADING>> ()
24+
\/ RAW <<TRAILING>> ()
25+
Anonymous: Code snippet contains complete initialization expression.
26+
\/ SNIPPET ada ()
27+
A : array (1 .. 5) of Integer := [1, 2, 3, 4, 5];
28+
\/ DESCRIPTION ()
29+
Anonymous: Code snippet contains complete initialization expression.
30+
**************************
31+
<ObjectDecl ["B"] arrays.ads:8:4-13:10>
32+
**************************
33+
\/ RAW <<LEADING>> ()
34+
\/ RAW <<TRAILING>> ()
35+
Anonymous Code snippet contains few items of initialization expression.
36+
\/ SNIPPET ada ()
37+
B : array (1 .. 5) of Integer :=
38+
[1,
39+
2,
40+
["2026"]
41+
5];
42+
\/ DESCRIPTION ()
43+
Anonymous Code snippet contains few items of initialization expression.
44+
**************************
45+
<ConcreteTypeDecl ["Integer_Array"] arrays.ads:16:4-16:63>
46+
**************************
47+
\/ RAW <<LEADING>> ()
48+
\/ RAW <<TRAILING>> ()
49+
\/ SNIPPET ada ()
50+
type Integer_Array is array (Positive range <>) of Integer;
51+
\/ DESCRIPTION ()
52+
**************************
53+
<ObjectDecl ["IA"] arrays.ads:18:4-18:51>
54+
**************************
55+
\/ RAW <<LEADING>> ()
56+
\/ RAW <<TRAILING>> ()
57+
Variable: Code snippet contains complete initialization expression.
58+
\/ SNIPPET ada ()
59+
IA : Integer_Array (1 .. 5) := [1, 2, 3, 4, 5];
60+
\/ DESCRIPTION ()
61+
Variable: Code snippet contains complete initialization expression.
62+
**************************
63+
<ObjectDecl ["IB"] arrays.ads:20:4-20:60>
64+
**************************
65+
\/ RAW <<LEADING>> ()
66+
Variable: Code snippet contains complete initialization expression.
67+
\/ RAW <<TRAILING>> ()
68+
Constant: Code snippet contains complete initialization expression.
69+
\/ SNIPPET ada ()
70+
IB : constant Integer_Array (1 .. 5) := [1, 2, 3, 4, 5];
71+
\/ DESCRIPTION ()
72+
Constant: Code snippet contains complete initialization expression.
73+
**************************
74+
<ObjectDecl ["IC"] arrays.ads:23:4-28:10>
75+
**************************
76+
\/ RAW <<LEADING>> ()
77+
\/ RAW <<TRAILING>> ()
78+
Variable: Code snippet contains few items of initialization expression.
79+
\/ SNIPPET ada ()
80+
IC : Integer_Array (1 .. 5) :=
81+
[1,
82+
2,
83+
["2026"]
84+
5];
85+
\/ DESCRIPTION ()
86+
Variable: Code snippet contains few items of initialization expression.
87+
**************************
88+
<ObjectDecl ["ID"] arrays.ads:30:4-35:10>
89+
**************************
90+
\/ RAW <<LEADING>> ()
91+
Variable: Code snippet contains few items of initialization expression.
92+
\/ RAW <<TRAILING>> ()
93+
Constant: Code snippet contains few items of initialization expression.
94+
\/ SNIPPET ada ()
95+
ID : constant Integer_Array (1 .. 5) :=
96+
[1,
97+
2,
98+
["2026"]
99+
5];
100+
\/ DESCRIPTION ()
101+
Constant: Code snippet contains few items of initialization expression.
102+
**************************
103+
<EndName arrays.ads:38:5-38:7>
104+
<Id "PA" arrays.ads:38:5-38:7>
105+
<PragmaNodeList arrays.ads:38:8-38:8>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Test that components from types deriving from abstract types
2+
# are correctly extracted.
3+
extractor_source: arrays.ads

0 commit comments

Comments
 (0)