Skip to content

Commit 11be345

Browse files
committed
Automated test for declarations of protected objects/types.
1 parent 8c0af90 commit 11be345

File tree

3 files changed

+145
-0
lines changed

3 files changed

+145
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ check_extractor:
1717
(cd testsuite/extractor && ../../.objs/test_extractor gnat.json exceptions.ads | diff -u --strip-trailing-cr exceptions.out -)
1818
(cd testsuite/extractor && ../../.objs/test_extractor gnat.json records.ads | diff -u --strip-trailing-cr records.out -)
1919
(cd testsuite/extractor && ../../.objs/test_extractor gnat.json tasks.ads | diff -u --strip-trailing-cr tasks.out -)
20+
(cd testsuite/extractor && ../../.objs/test_extractor gnat.json protecteds.ads | diff -u --strip-trailing-cr protecteds.out -)

testsuite/extractor/protecteds.ads

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
-- This package contains test cases of documentation extraction for protected
3+
-- types. Coverage of tests of procedures/functions/entries are limited to few
4+
-- cases only (this code is tested by subprograms tests).
5+
6+
package Protecteds is
7+
8+
type IE is synchronized interface;
9+
10+
type IP is synchronized interface;
11+
12+
not overriding procedure Process (Self : IP) is abstract;
13+
14+
-- Leading description of the protected type P_Leading.
15+
protected P_Leading is
16+
end P_Leading;
17+
18+
protected P_Intermediate is
19+
-- Intermediate description of the protected type P_Intermediate.
20+
end P_Intermediate;
21+
22+
-- Leading description of the protected type PT_Leading.
23+
protected type PT_Leading is
24+
end PT_Leading;
25+
26+
protected type PT_Intermediate is
27+
-- Intermediate description of the protected type PT_Intermediate.
28+
end PT_Intermediate;
29+
30+
end Protecteds;

testsuite/extractor/protecteds.out

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<CompilationUnit protecteds.ads:6:1-30:16>
2+
<AdaNodeList protecteds.ads:6:1-6:1>
3+
<LibraryItem protecteds.ads:6:1-30:16>
4+
<PrivateAbsent protecteds.ads:6:1-6:1>
5+
<PackageDecl ["Protecteds"] protecteds.ads:6:1-30:16>
6+
**************************
7+
\/ RAW <<LEADING>> () 0 0 0 0
8+
This package contains test cases of documentation extraction for protected
9+
types. Coverage of tests of procedures/functions/entries are limited to few
10+
cases only (this code is tested by subprograms tests).
11+
\/ RAW <<INTERMEDIATE UPPER>> () 0 0 0 0
12+
\/ DESCRIPTION () 0 0 0 0
13+
This package contains test cases of documentation extraction for protected
14+
types. Coverage of tests of procedures/functions/entries are limited to few
15+
cases only (this code is tested by subprograms tests).
16+
**************************
17+
<DefiningName protecteds.ads:6:9-6:19>
18+
<Id "Protecteds" protecteds.ads:6:9-6:19>
19+
<PublicPart protecteds.ads:6:22-30:1>
20+
<AdaNodeList protecteds.ads:8:4-28:24>
21+
<ConcreteTypeDecl ["IE"] protecteds.ads:8:4-8:38>
22+
**************************
23+
\/ RAW <<LEADING>> () 0 0 0 0
24+
\/ RAW <<TRAILING>> () 0 0 0 0
25+
\/ SNIPPET ada () 0 0 0 0
26+
type IE is synchronized interface;
27+
\/ DESCRIPTION () 0 0 0 0
28+
**************************
29+
<ConcreteTypeDecl ["IP"] protecteds.ads:10:4-10:38>
30+
**************************
31+
\/ RAW <<LEADING>> () 0 0 0 0
32+
\/ RAW <<TRAILING>> () 0 0 0 0
33+
\/ SNIPPET ada () 0 0 0 0
34+
type IP is synchronized interface;
35+
\/ DESCRIPTION () 0 0 0 0
36+
**************************
37+
<AbstractSubpDecl ["Process"] protecteds.ads:12:4-12:61>
38+
**************************
39+
\/ RAW <<INTERMEDIATE UPPER>> () 13 0 0 0
40+
\/ RAW <<INTERMEDIATE LOWER>> () 0 0 0 0
41+
\/ PARAMETER self (Self) 12 12 0 0
42+
\/ RAW <<LEADING>> () 0 0 0 0
43+
\/ RAW <<TRAILING>> () 0 0 0 0
44+
\/ SNIPPET ada () 0 0 0 0
45+
procedure Process (Self : IP)
46+
\/ DESCRIPTION () 0 0 0 0
47+
**************************
48+
<SingleProtectedDecl ["P_Leading"] protecteds.ads:15:4-16:18>
49+
**************************
50+
\/ RAW <<LEADING>> () 0 0 0 0
51+
Leading description of the protected type P_Leading.
52+
\/ RAW <<INTERMEDIATE UPPER>> () 0 0 0 0
53+
\/ DESCRIPTION () 0 0 0 0
54+
Leading description of the protected type P_Leading.
55+
**************************
56+
<DefiningName protecteds.ads:15:14-15:23>
57+
<Id "P_Leading" protecteds.ads:15:14-15:23>
58+
<ParentList protecteds.ads:15:23-15:23>
59+
<ProtectedDef protecteds.ads:16:4-16:17>
60+
<PublicPart protecteds.ads:15:26-16:4>
61+
<DeclList protecteds.ads:15:26-15:26>
62+
<EndName protecteds.ads:16:8-16:17>
63+
<Id "P_Leading" protecteds.ads:16:8-16:17>
64+
<SingleProtectedDecl ["P_Intermediate"] protecteds.ads:18:4-20:23>
65+
**************************
66+
\/ RAW <<LEADING>> () 0 0 0 0
67+
\/ RAW <<INTERMEDIATE UPPER>> () 0 0 0 0
68+
Intermediate description of the protected type P_Intermediate.
69+
\/ DESCRIPTION () 0 0 0 0
70+
Intermediate description of the protected type P_Intermediate.
71+
**************************
72+
<DefiningName protecteds.ads:18:14-18:28>
73+
<Id "P_Intermediate" protecteds.ads:18:14-18:28>
74+
<ParentList protecteds.ads:18:28-18:28>
75+
<ProtectedDef protecteds.ads:20:4-20:22>
76+
<PublicPart protecteds.ads:18:31-20:4>
77+
<DeclList protecteds.ads:18:31-18:31>
78+
<EndName protecteds.ads:20:8-20:22>
79+
<Id "P_Intermediate" protecteds.ads:20:8-20:22>
80+
<ProtectedTypeDecl ["PT_Leading"] protecteds.ads:23:4-24:19>
81+
**************************
82+
\/ RAW <<LEADING>> () 0 0 0 0
83+
Leading description of the protected type PT_Leading.
84+
\/ RAW <<INTERMEDIATE UPPER>> () 0 0 0 0
85+
\/ DESCRIPTION () 0 0 0 0
86+
Leading description of the protected type PT_Leading.
87+
**************************
88+
<DefiningName protecteds.ads:23:19-23:29>
89+
<Id "PT_Leading" protecteds.ads:23:19-23:29>
90+
<ParentList protecteds.ads:23:29-23:29>
91+
<ProtectedDef protecteds.ads:24:4-24:18>
92+
<PublicPart protecteds.ads:23:32-24:4>
93+
<DeclList protecteds.ads:23:32-23:32>
94+
<EndName protecteds.ads:24:8-24:18>
95+
<Id "PT_Leading" protecteds.ads:24:8-24:18>
96+
<ProtectedTypeDecl ["PT_Intermediate"] protecteds.ads:26:4-28:24>
97+
**************************
98+
\/ RAW <<LEADING>> () 0 0 0 0
99+
\/ RAW <<INTERMEDIATE UPPER>> () 0 0 0 0
100+
Intermediate description of the protected type PT_Intermediate.
101+
\/ DESCRIPTION () 0 0 0 0
102+
Intermediate description of the protected type PT_Intermediate.
103+
**************************
104+
<DefiningName protecteds.ads:26:19-26:34>
105+
<Id "PT_Intermediate" protecteds.ads:26:19-26:34>
106+
<ParentList protecteds.ads:26:34-26:34>
107+
<ProtectedDef protecteds.ads:28:4-28:23>
108+
<PublicPart protecteds.ads:26:37-28:4>
109+
<DeclList protecteds.ads:26:37-26:37>
110+
<EndName protecteds.ads:28:8-28:23>
111+
<Id "PT_Intermediate" protecteds.ads:28:8-28:23>
112+
<EndName protecteds.ads:30:5-30:15>
113+
<Id "Protecteds" protecteds.ads:30:5-30:15>
114+
<PragmaNodeList protecteds.ads:30:16-30:16>

0 commit comments

Comments
 (0)