giscanner: add AnnotationParser tests
[platform/upstream/gobject-introspection.git] / tests / scanner / annotationparser / gi / syntax_identifier.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <tests>
4
5 <test>
6   <!--
7   Identifier part not on the first line.
8   -->
9   <commentblock>/**
10 *
11 * SECTION:meepapp
12 */</commentblock>
13 </test>
14
15 <test>
16   <!--
17   Multiple identifier parts
18   -->
19   <commentblock>/**
20  * SECTION:meepapp
21  * SECTION:meepapp2
22  * @short_description: the application class
23  *
24  * The application class handles ...
25  */</commentblock>
26   <docblock>
27     <identifier>
28       <name>SECTION:meepapp</name>
29     </identifier>
30     <parameters>
31       <parameter>
32         <name>short_description</name>
33         <description>the application class</description>
34       </parameter>
35     </parameters>
36     <description>SECTION:meepapp2
37 The application class handles ...</description>
38   </docblock>
39 </test>
40
41 <test>
42   <!--
43   Section documentation including all optional metadata.
44   -->
45   <commentblock>/**
46  * SECTION:meepapp
47  * @short_description: the application class
48  * @title: Meep application
49  * @section_id:
50  * @see_also: #MeepSettings
51  * @stability: Stable
52  * @include: meep/app.h
53  * @image: application.png
54  *
55  * The application class handles ...
56  */</commentblock>
57   <docblock>
58     <identifier>
59       <name>SECTION:meepapp</name>
60     </identifier>
61     <parameters>
62       <parameter>
63         <name>short_description</name>
64         <description>the application class</description>
65       </parameter>
66       <parameter>
67         <name>title</name>
68         <description>Meep application</description>
69       </parameter>
70       <parameter>
71         <name>section_id</name>
72       </parameter>
73       <parameter>
74         <name>see_also</name>
75         <description>#MeepSettings</description>
76       </parameter>
77       <parameter>
78         <name>stability</name>
79         <description>Stable</description>
80       </parameter>
81       <parameter>
82         <name>include</name>
83         <description>meep/app.h</description>
84       </parameter>
85       <parameter>
86         <name>image</name>
87         <description>application.png</description>
88       </parameter>
89     </parameters>
90     <description>The application class handles ...</description>
91   </docblock>
92 </test>
93
94 <test>
95   <!--
96   Broken comment block with empty line between identifier and parameters parts.
97   -->
98   <commentblock>/**
99  * SECTION:meepapp
100  *
101  * @short_description: the application class
102  * @title: Meep application
103  * @section_id:
104  * @see_also: #MeepSettings
105  * @stability: Stable
106  * @include: meep/app.h
107  * @image: application.png
108  *
109  * The application class handles ...
110  */</commentblock>
111   <docblock>
112     <identifier>
113       <name>SECTION:meepapp</name>
114     </identifier>
115     <parameters>
116       <parameter>
117         <name>short_description</name>
118         <description>the application class</description>
119       </parameter>
120       <parameter>
121         <name>title</name>
122         <description>Meep application</description>
123       </parameter>
124       <parameter>
125         <name>section_id</name>
126       </parameter>
127       <parameter>
128         <name>see_also</name>
129         <description>#MeepSettings</description>
130       </parameter>
131       <parameter>
132         <name>stability</name>
133         <description>Stable</description>
134       </parameter>
135       <parameter>
136         <name>include</name>
137         <description>meep/app.h</description>
138       </parameter>
139       <parameter>
140         <name>image</name>
141         <description>application.png</description>
142       </parameter>
143     </parameters>
144     <description>The application class handles ...</description>
145   </docblock>
146 </test>
147
148 <test>
149   <!--
150   Broken comment block with description part before parameters part, without empty line.
151   -->
152   <commentblock>/**
153  * SECTION:meepapp
154  *
155  * The application class handles ...
156  * @short_description: the application class
157  * @title: Meep application
158  * @section_id:
159  * @see_also: #MeepSettings
160  * @stability: Stable
161  * @include: meep/app.h
162  * @image: application.png
163  */</commentblock>
164   <docblock>
165     <identifier>
166       <name>SECTION:meepapp</name>
167     </identifier>
168     <parameters>
169       <parameter>
170         <name>short_description</name>
171         <description>the application class</description>
172       </parameter>
173       <parameter>
174         <name>title</name>
175         <description>Meep application</description>
176       </parameter>
177       <parameter>
178         <name>section_id</name>
179       </parameter>
180       <parameter>
181         <name>see_also</name>
182         <description>#MeepSettings</description>
183       </parameter>
184       <parameter>
185         <name>stability</name>
186         <description>Stable</description>
187       </parameter>
188       <parameter>
189         <name>include</name>
190         <description>meep/app.h</description>
191       </parameter>
192       <parameter>
193         <name>image</name>
194         <description>application.png</description>
195       </parameter>
196     </parameters>
197     <description>The application class handles ...</description>
198   </docblock>
199 </test>
200
201 <test>
202   <!--
203   Broken comment block with description part before parameters part, with empty line.
204   -->
205   <commentblock>/**
206  * SECTION:meepapp
207  *
208  * The application class handles ...
209  *
210  * @short_description: the application class
211  * @title: Meep application
212  * @section_id:
213  * @see_also: #MeepSettings
214  * @stability: Stable
215  * @include: meep/app.h
216  * @image: application.png
217  */</commentblock>
218   <docblock>
219     <identifier>
220       <name>SECTION:meepapp</name>
221     </identifier>
222     <parameters>
223       <parameter>
224         <name>short_description</name>
225         <description>the application class</description>
226       </parameter>
227       <parameter>
228         <name>title</name>
229         <description>Meep application</description>
230       </parameter>
231       <parameter>
232         <name>section_id</name>
233       </parameter>
234       <parameter>
235         <name>see_also</name>
236         <description>#MeepSettings</description>
237       </parameter>
238       <parameter>
239         <name>stability</name>
240         <description>Stable</description>
241       </parameter>
242       <parameter>
243         <name>include</name>
244         <description>meep/app.h</description>
245       </parameter>
246       <parameter>
247         <name>image</name>
248         <description>application.png</description>
249       </parameter>
250     </parameters>
251     <description>The application class handles ...</description>
252   </docblock>
253 </test>
254
255 <test>
256   <!--
257   Old style implicit returns.
258   https://bugzilla.gnome.org/show_bug.cgi?id=457077
259   -->
260   <commentblock>/**
261  * SECTION:tester
262  * @short_description: module for gtk-doc unit test
263  *
264  * This file contains non-sense code for the sole purpose of testing the docs.
265  *
266  * As described in http://bugzilla.gnome.org/show_bug.cgi?id=457077 it
267  * returns nothing.
268  */</commentblock>
269   <docblock>
270     <identifier>
271       <name>SECTION:tester</name>
272     </identifier>
273     <parameters>
274       <parameter>
275         <name>short_description</name>
276         <description>module for gtk-doc unit test</description>
277       </parameter>
278     </parameters>
279     <description>This file contains non-sense code for the sole purpose of testing the docs.
280
281 As described in http://bugzilla.gnome.org/show_bug.cgi?id=457077 it
282 returns nothing.</description>
283   </docblock>
284 </test>
285
286 </tests>