giscanner: add AnnotationParser tests
[platform/upstream/gobject-introspection.git] / tests / scanner / annotationparser / gi / annotation_element_type.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <tests>
4
5 <test>
6   <commentblock>/**
7  * foo_test_array:
8  *
9  * Returns: (element-type utf8) (transfer container): returns %NULL.
10  */</commentblock>
11   <docblock>
12     <identifier>
13       <name>foo_test_array</name>
14     </identifier>
15     <tags>
16       <tag>
17         <name>returns</name>
18         <annotations>
19           <annotation>
20             <name>element-type</name>
21             <options>
22               <option>
23                 <name>utf8</name>
24               </option>
25             </options>
26           </annotation>
27           <annotation>
28             <name>transfer</name>
29             <options>
30               <option>
31                 <name>container</name>
32               </option>
33             </options>
34           </annotation>
35         </annotations>
36         <description>returns %NULL.</description>
37       </tag>
38     </tags>
39   </docblock>
40 </test>
41
42 <test>
43   <commentblock>/**
44  * RegressTestObj::sig-with-hash-prop:
45  * @self: an object
46  * @hash: (element-type utf8 GObject.Value):
47  *
48  * This test signal is like TelepathyGlib's
49  *  TpAccount::status-changed
50  */</commentblock>
51   <docblock>
52     <identifier>
53       <name>RegressTestObj::sig-with-hash-prop</name>
54     </identifier>
55     <parameters>
56       <parameter>
57         <name>self</name>
58         <description>an object</description>
59       </parameter>
60       <parameter>
61         <name>hash</name>
62         <annotations>
63           <annotation>
64             <name>element-type</name>
65             <options>
66               <option>
67                 <name>utf8</name>
68               </option>
69               <option>
70                 <name>GObject.Value</name>
71               </option>
72             </options>
73           </annotation>
74         </annotations>
75       </parameter>
76     </parameters>
77     <description>This test signal is like TelepathyGlib's
78  TpAccount::status-changed</description>
79   </docblock>
80 </test>
81
82 <test>
83   <commentblock><![CDATA[/**
84  * regress_test_ghash_nested_everything_return2:
85  *
86  * Another way of specifying nested parameterized types: using the
87  * element-type annotation.
88  *
89  * Return value: (element-type utf8 GLib.HashTable<utf8,utf8>) (transfer full):
90  */]]></commentblock>
91   <docblock>
92     <identifier>
93       <name>regress_test_ghash_nested_everything_return2</name>
94     </identifier>
95     <description>Another way of specifying nested parameterized types: using the
96 element-type annotation.</description>
97     <tags>
98       <tag>
99         <name>returns</name>
100         <annotations>
101           <annotation>
102             <name>element-type</name>
103             <options>
104               <option>
105                 <name>utf8</name>
106               </option>
107               <option>
108                 <name><![CDATA[GLib.HashTable<utf8,utf8>]]></name>
109               </option>
110             </options>
111           </annotation>
112           <annotation>
113             <name>transfer</name>
114             <options>
115               <option>
116                 <name>full</name>
117               </option>
118             </options>
119           </annotation>
120         </annotations>
121       </tag>
122     </tags>
123   </docblock>
124 </test>
125
126 </tests>