giscanner: add AnnotationParser tests
[platform/upstream/gobject-introspection.git] / tests / scanner / annotationparser / gi / annotation_transfer.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <tests>
4
5 <test>
6   <commentblock>/**
7  * AnnotationObject::list-signal:
8  * @annotation: the annotation object
9  * @list: (type GLib.List) (element-type utf8) (transfer container): a list of strings
10  *
11  * This is a signal which takes a list of strings, but it's not
12  * known by GObject as it's only marked as G_TYPE_POINTER
13  */</commentblock>
14   <docblock>
15     <identifier>
16       <name>AnnotationObject::list-signal</name>
17     </identifier>
18     <parameters>
19       <parameter>
20         <name>annotation</name>
21         <description>the annotation object</description>
22       </parameter>
23       <parameter>
24         <name>list</name>
25         <annotations>
26           <annotation>
27             <name>type</name>
28             <options>
29               <option>
30                 <name>GLib.List</name>
31               </option>
32             </options>
33           </annotation>
34           <annotation>
35             <name>element-type</name>
36             <options>
37               <option>
38                 <name>utf8</name>
39               </option>
40             </options>
41           </annotation>
42           <annotation>
43             <name>transfer</name>
44             <options>
45               <option>
46                 <name>container</name>
47               </option>
48             </options>
49           </annotation>
50         </annotations>
51         <description>a list of strings</description>
52       </parameter>
53     </parameters>
54     <description>This is a signal which takes a list of strings, but it's not
55 known by GObject as it's only marked as G_TYPE_POINTER</description>
56   </docblock>
57 </test>
58
59 <test>
60   <commentblock>/**
61  * annotation_object_in:
62  * @object: a #GObject
63  * @inarg: (in) (transfer none): This is an argument test
64  *
65  * This is a test for in arguments
66  *
67  * Return value: an int
68  */</commentblock>
69   <docblock>
70     <identifier>
71       <name>annotation_object_in</name>
72     </identifier>
73     <parameters>
74       <parameter>
75         <name>object</name>
76         <description>a #GObject</description>
77       </parameter>
78       <parameter>
79         <name>inarg</name>
80         <annotations>
81           <annotation>
82             <name>in</name>
83           </annotation>
84           <annotation>
85             <name>transfer</name>
86             <options>
87               <option>
88                 <name>none</name>
89               </option>
90             </options>
91           </annotation>
92         </annotations>
93         <description>This is an argument test</description>
94       </parameter>
95     </parameters>
96     <description>This is a test for in arguments</description>
97     <tags>
98       <tag>
99         <name>returns</name>
100         <description>an int</description>
101       </tag>
102     </tags>
103   </docblock>
104 </test>
105
106 <test>
107   <commentblock>/**
108  * annotation_transfer_floating:
109  *
110  * Returns: (transfer floating): A floating object
111  */</commentblock>
112   <docblock>
113     <identifier>
114       <name>annotation_transfer_floating</name>
115     </identifier>
116     <tags>
117       <tag>
118         <name>returns</name>
119         <annotations>
120           <annotation>
121             <name>transfer</name>
122             <options>
123               <option>
124                 <name>floating</name>
125               </option>
126             </options>
127           </annotation>
128         </annotations>
129         <description>A floating object</description>
130       </tag>
131     </tags>
132   </docblock>
133 </test>
134
135 <test>
136   <!--
137   "Transfer:" tag syntax
138   -->
139   <commentblock>/**
140  * FsSession:codecs-without-config:
141  *
142  * This is the same list of codecs as #FsSession:codecs
143  * without....
144  *
145  * Transfer: full
146  */</commentblock>
147   <docblock>
148     <identifier>
149       <name>FsSession:codecs-without-config</name>
150     </identifier>
151     <description>This is the same list of codecs as #FsSession:codecs
152 without....</description>
153     <tags>
154       <tag>
155         <name>transfer</name>
156         <description>full</description>
157       </tag>
158     </tags>
159   </docblock>
160 </test>
161
162 </tests>