giscanner: add AnnotationParser tests
[platform/upstream/gobject-introspection.git] / tests / scanner / annotationparser / gi / annotation_scope.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <tests>
4
5 <test>
6   <commentblock>/**
7  * annotation_object_foreach:
8  * @object: a #AnnotationObject
9  * @func: (scope call): Callback to invoke
10  * @user_data: Callback user data
11  *
12  * Test taking a call-scoped callback
13  **/</commentblock>
14   <docblock>
15     <identifier>
16       <name>annotation_object_foreach</name>
17     </identifier>
18     <parameters>
19       <parameter>
20         <name>object</name>
21         <description>a #AnnotationObject</description>
22       </parameter>
23       <parameter>
24         <name>func</name>
25         <annotations>
26           <annotation>
27             <name>scope</name>
28             <options>
29               <option>
30                 <name>call</name>
31               </option>
32             </options>
33           </annotation>
34         </annotations>
35         <description>Callback to invoke</description>
36       </parameter>
37       <parameter>
38         <name>user_data</name>
39         <description>Callback user data</description>
40       </parameter>
41     </parameters>
42     <description>Test taking a call-scoped callback</description>
43   </docblock>
44 </test>
45
46 <test>
47   <commentblock>/**
48  * regress_test_callback_destroy_notify:
49  * @callback: (scope notified):
50  *
51  * Notified - callback persists until a DestroyNotify delegate
52  * is invoked.
53  **/</commentblock>
54   <docblock>
55     <identifier>
56       <name>regress_test_callback_destroy_notify</name>
57     </identifier>
58     <parameters>
59       <parameter>
60         <name>callback</name>
61         <annotations>
62           <annotation>
63             <name>scope</name>
64             <options>
65               <option>
66                 <name>notified</name>
67               </option>
68             </options>
69           </annotation>
70         </annotations>
71       </parameter>
72     </parameters>
73     <description>Notified - callback persists until a DestroyNotify delegate
74 is invoked.</description>
75   </docblock>
76 </test>
77
78 <test>
79   <commentblock>/**
80  * regress_test_callback_async:
81  * @callback: (scope async):
82  *
83  **/</commentblock>
84   <docblock>
85     <identifier>
86       <name>regress_test_callback_async</name>
87     </identifier>
88     <parameters>
89       <parameter>
90         <name>callback</name>
91         <annotations>
92           <annotation>
93             <name>scope</name>
94             <options>
95               <option>
96                 <name>async</name>
97               </option>
98             </options>
99           </annotation>
100         </annotations>
101       </parameter>
102     </parameters>
103   </docblock>
104 </test>
105
106 </tests>