summaryrefslogtreecommitdiff
path: root/tests/scanner/annotationparser/gi
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-09-04 16:13:21 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-09-04 16:13:21 +0000
commita194122be492fbddd8748fe323a648434a866c36 (patch)
treef39293588b7922faa40f0c6b985a031f8f5cf0ae /tests/scanner/annotationparser/gi
parent8a2a9f9db169eaaf2a7eede18e0ceba0af44345f (diff)
parent85d02d59f101f9eb37829b16a81890ef9801824a (diff)
downloadgobject-introspection-a194122be492fbddd8748fe323a648434a866c36.tar.gz
merge with GOBJECT_INTROSPECTION_1_37_6baserock/jonathan/fix-giscanner
Diffstat (limited to 'tests/scanner/annotationparser/gi')
-rw-r--r--tests/scanner/annotationparser/gi/annotation_allow_none.xml47
-rw-r--r--tests/scanner/annotationparser/gi/annotation_array.xml277
-rw-r--r--tests/scanner/annotationparser/gi/annotation_closure.xml74
-rw-r--r--tests/scanner/annotationparser/gi/annotation_constructor.xml21
-rw-r--r--tests/scanner/annotationparser/gi/annotation_destroy.xml46
-rw-r--r--tests/scanner/annotationparser/gi/annotation_element_type.xml126
-rw-r--r--tests/scanner/annotationparser/gi/annotation_foreign.xml22
-rw-r--r--tests/scanner/annotationparser/gi/annotation_get_value_func.xml30
-rw-r--r--tests/scanner/annotationparser/gi/annotation_in.xml52
-rw-r--r--tests/scanner/annotationparser/gi/annotation_in_out.xml54
-rw-r--r--tests/scanner/annotationparser/gi/annotation_method.xml28
-rw-r--r--tests/scanner/annotationparser/gi/annotation_out.xml110
-rw-r--r--tests/scanner/annotationparser/gi/annotation_ref_func.xml30
-rw-r--r--tests/scanner/annotationparser/gi/annotation_rename_to.xml52
-rw-r--r--tests/scanner/annotationparser/gi/annotation_scope.xml106
-rw-r--r--tests/scanner/annotationparser/gi/annotation_set_value_func.xml30
-rw-r--r--tests/scanner/annotationparser/gi/annotation_skip.xml43
-rw-r--r--tests/scanner/annotationparser/gi/annotation_transfer.xml162
-rw-r--r--tests/scanner/annotationparser/gi/annotation_type.xml84
-rw-r--r--tests/scanner/annotationparser/gi/annotation_unref_func.xml30
-rw-r--r--tests/scanner/annotationparser/gi/annotation_value.xml30
-rw-r--r--tests/scanner/annotationparser/gi/annotation_virtual.xml47
-rw-r--r--tests/scanner/annotationparser/gi/syntax.xml136
-rw-r--r--tests/scanner/annotationparser/gi/syntax_identifier.xml304
-rw-r--r--tests/scanner/annotationparser/gi/syntax_nested_tags.xml43
-rw-r--r--tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml239
-rw-r--r--tests/scanner/annotationparser/gi/tag_deprecated.xml43
-rw-r--r--tests/scanner/annotationparser/gi/tag_description.xml21
-rw-r--r--tests/scanner/annotationparser/gi/tag_returns.xml76
-rw-r--r--tests/scanner/annotationparser/gi/tag_since.xml43
-rw-r--r--tests/scanner/annotationparser/gi/tag_stability.xml81
31 files changed, 2487 insertions, 0 deletions
diff --git a/tests/scanner/annotationparser/gi/annotation_allow_none.xml b/tests/scanner/annotationparser/gi/annotation_allow_none.xml
new file mode 100644
index 00000000..02db79a9
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_allow_none.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * annotation_object_inout:
+ * @object: a #GObject
+ * @inoutarg: (inout) (allow-none): This is an argument test
+ *
+ * This is a test for out arguments
+ *
+ * Return value: an int
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_inout</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>a #GObject</description>
+ </parameter>
+ <parameter>
+ <name>inoutarg</name>
+ <annotations>
+ <annotation>
+ <name>inout</name>
+ </annotation>
+ <annotation>
+ <name>allow-none</name>
+ </annotation>
+ </annotations>
+ <description>This is an argument test</description>
+ </parameter>
+ </parameters>
+ <description>This is a test for out arguments</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>an int</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_array.xml b/tests/scanner/annotationparser/gi/annotation_array.xml
new file mode 100644
index 00000000..26bb1104
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_array.xml
@@ -0,0 +1,277 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * annotation_object_compute_sum:
+ * @nums: (array): Sequence of numbers
+ *
+ * Test taking a zero-terminated array
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_compute_sum</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>nums</name>
+ <annotations>
+ <annotation>
+ <name>array</name>
+ </annotation>
+ </annotations>
+ <description>Sequence of numbers</description>
+ </parameter>
+ </parameters>
+ <description>Test taking a zero-terminated array</description>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * annotation_object_compute_sum_n:
+ * @object: a #AnnotationObject
+ * @nums: (array length=n_nums zero-terminated=0): Sequence of
+ * numbers that are zero-terminated
+ * @n_nums: Length of number array
+ *
+ * Test taking an array with length parameter
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_compute_sum_n</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>a #AnnotationObject</description>
+ </parameter>
+ <parameter>
+ <name>nums</name>
+ <annotations>
+ <annotation>
+ <name>array</name>
+ <options>
+ <option>
+ <name>length</name>
+ <value>n_nums</value>
+ </option>
+ <option>
+ <name>zero-terminated</name>
+ <value>0</value>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>Sequence of numbers that are zero-terminated</description>
+ </parameter>
+ <parameter>
+ <name>n_nums</name>
+ <description>Length of number array</description>
+ </parameter>
+ </parameters>
+ <description>Test taking an array with length parameter</description>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * annotation_object_compute_sum_nz:
+ * @object: a #AnnotationObject
+ * @nums: (array length=n_nums zero-terminated=1): Sequence of numbers that
+ * are zero-terminated
+ * @n_nums: Length of number array
+ *
+ * Test taking a zero-terminated array with length parameter
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_compute_sum_nz</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>a #AnnotationObject</description>
+ </parameter>
+ <parameter>
+ <name>nums</name>
+ <annotations>
+ <annotation>
+ <name>array</name>
+ <options>
+ <option>
+ <name>length</name>
+ <value>n_nums</value>
+ </option>
+ <option>
+ <name>zero-terminated</name>
+ <value>1</value>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>Sequence of numbers that are zero-terminated</description>
+ </parameter>
+ <parameter>
+ <name>n_nums</name>
+ <description>Length of number array</description>
+ </parameter>
+ </parameters>
+ <description>Test taking a zero-terminated array with length parameter</description>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * annotation_object_parse_args:
+ * @object: a #AnnotationObject
+ * @argc: (inout): Length of the argument vector
+ * @argv: (inout) (array length=argc zero-terminated=1): Argument vector
+ *
+ * Test taking a zero-terminated array with length parameter
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_parse_args</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>a #AnnotationObject</description>
+ </parameter>
+ <parameter>
+ <name>argc</name>
+ <annotations>
+ <annotation>
+ <name>inout</name>
+ </annotation>
+ </annotations>
+ <description>Length of the argument vector</description>
+ </parameter>
+ <parameter>
+ <name>argv</name>
+ <annotations>
+ <annotation>
+ <name>inout</name>
+ </annotation>
+ <annotation>
+ <name>array</name>
+ <options>
+ <option>
+ <name>length</name>
+ <value>argc</value>
+ </option>
+ <option>
+ <name>zero-terminated</name>
+ <value>1</value>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>Argument vector</description>
+ </parameter>
+ </parameters>
+ <description>Test taking a zero-terminated array with length parameter</description>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * annotation_object_set_data:
+ * @object: a #AnnotationObject
+ * @data: (array length=length): The data
+ * @length: Length of the data
+ *
+ * Test taking a guchar * with a length.
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_set_data</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>a #AnnotationObject</description>
+ </parameter>
+ <parameter>
+ <name>data</name>
+ <annotations>
+ <annotation>
+ <name>array</name>
+ <options>
+ <option>
+ <name>length</name>
+ <value>length</value>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>The data</description>
+ </parameter>
+ <parameter>
+ <name>length</name>
+ <description>Length of the data</description>
+ </parameter>
+ </parameters>
+ <description>Test taking a guchar * with a length.</description>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * annotation_string_zero_terminated:
+ * @data: (array fixed-size=2): a third value
+ *
+ * Return value: (transfer full) (array zero-terminated=1): The return value
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_string_zero_terminated</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>data</name>
+ <annotations>
+ <annotation>
+ <name>array</name>
+ <options>
+ <option>
+ <name>fixed-size</name>
+ <value>2</value>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>a third value</description>
+ </parameter>
+ </parameters>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <annotations>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>full</name>
+ </option>
+ </options>
+ </annotation>
+ <annotation>
+ <name>array</name>
+ <options>
+ <option>
+ <name>zero-terminated</name>
+ <value>1</value>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>The return value</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_closure.xml b/tests/scanner/annotationparser/gi/annotation_closure.xml
new file mode 100644
index 00000000..8211dc7b
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_closure.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * AnnotationNotifyFunc:
+ * @data: (closure): The user data
+ *
+ * This is a callback with a 'closure' argument that is not named
+ * 'user_data' and hence has to be annotated.
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>AnnotationNotifyFunc</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>data</name>
+ <annotations>
+ <annotation>
+ <name>closure</name>
+ </annotation>
+ </annotations>
+ <description>The user data</description>
+ </parameter>
+ </parameters>
+ <description>This is a callback with a 'closure' argument that is not named
+'user_data' and hence has to be annotated.</description>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * annotation_custom_destroy:
+ * @callback: (destroy destroy) (closure data): Destroy notification
+ *
+ * Test messing up the heuristic of closure/destroy-notification
+ * detection, and fixing it via annotations.
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_custom_destroy</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>callback</name>
+ <annotations>
+ <annotation>
+ <name>destroy</name>
+ <options>
+ <option>
+ <name>destroy</name>
+ </option>
+ </options>
+ </annotation>
+ <annotation>
+ <name>closure</name>
+ <options>
+ <option>
+ <name>data</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>Destroy notification</description>
+ </parameter>
+ </parameters>
+ <description>Test messing up the heuristic of closure/destroy-notification
+detection, and fixing it via annotations.</description>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_constructor.xml b/tests/scanner/annotationparser/gi/annotation_constructor.xml
new file mode 100644
index 00000000..4bf3b038
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_constructor.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * regress_constructor: (constructor)
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>regress_constructor</name>
+ <annotations>
+ <annotation>
+ <name>constructor</name>
+ </annotation>
+ </annotations>
+ </identifier>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_destroy.xml b/tests/scanner/annotationparser/gi/annotation_destroy.xml
new file mode 100644
index 00000000..449dd8e1
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_destroy.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * annotation_custom_destroy:
+ * @callback: (destroy destroy) (closure data): Destroy notification
+ *
+ * Test messing up the heuristic of closure/destroy-notification
+ * detection, and fixing it via annotations.
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_custom_destroy</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>callback</name>
+ <annotations>
+ <annotation>
+ <name>destroy</name>
+ <options>
+ <option>
+ <name>destroy</name>
+ </option>
+ </options>
+ </annotation>
+ <annotation>
+ <name>closure</name>
+ <options>
+ <option>
+ <name>data</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>Destroy notification</description>
+ </parameter>
+ </parameters>
+ <description>Test messing up the heuristic of closure/destroy-notification
+detection, and fixing it via annotations.</description>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_element_type.xml b/tests/scanner/annotationparser/gi/annotation_element_type.xml
new file mode 100644
index 00000000..d03c4268
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_element_type.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * foo_test_array:
+ *
+ * Returns: (element-type utf8) (transfer container): returns %NULL.
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>foo_test_array</name>
+ </identifier>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <annotations>
+ <annotation>
+ <name>element-type</name>
+ <options>
+ <option>
+ <name>utf8</name>
+ </option>
+ </options>
+ </annotation>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>container</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>returns %NULL.</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * RegressTestObj::sig-with-hash-prop:
+ * @self: an object
+ * @hash: (element-type utf8 GObject.Value):
+ *
+ * This test signal is like TelepathyGlib's
+ * TpAccount::status-changed
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>RegressTestObj::sig-with-hash-prop</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>self</name>
+ <description>an object</description>
+ </parameter>
+ <parameter>
+ <name>hash</name>
+ <annotations>
+ <annotation>
+ <name>element-type</name>
+ <options>
+ <option>
+ <name>utf8</name>
+ </option>
+ <option>
+ <name>GObject.Value</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </parameter>
+ </parameters>
+ <description>This test signal is like TelepathyGlib's
+ TpAccount::status-changed</description>
+ </docblock>
+</test>
+
+<test>
+ <commentblock><![CDATA[/**
+ * regress_test_ghash_nested_everything_return2:
+ *
+ * Another way of specifying nested parameterized types: using the
+ * element-type annotation.
+ *
+ * Return value: (element-type utf8 GLib.HashTable<utf8,utf8>) (transfer full):
+ */]]></commentblock>
+ <docblock>
+ <identifier>
+ <name>regress_test_ghash_nested_everything_return2</name>
+ </identifier>
+ <description>Another way of specifying nested parameterized types: using the
+element-type annotation.</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <annotations>
+ <annotation>
+ <name>element-type</name>
+ <options>
+ <option>
+ <name>utf8</name>
+ </option>
+ <option>
+ <name><![CDATA[GLib.HashTable<utf8,utf8>]]></name>
+ </option>
+ </options>
+ </annotation>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>full</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_foreign.xml b/tests/scanner/annotationparser/gi/annotation_foreign.xml
new file mode 100644
index 00000000..11e589c5
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_foreign.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * FooForeignStruct: (foreign)
+ *
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>FooForeignStruct</name>
+ <annotations>
+ <annotation>
+ <name>foreign</name>
+ </annotation>
+ </annotations>
+ </identifier>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_get_value_func.xml b/tests/scanner/annotationparser/gi/annotation_get_value_func.xml
new file mode 100644
index 00000000..bc779943
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_get_value_func.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <!--
+ "Get value func:" tag syntax
+ -->
+ <commentblock>/**
+ * RegressTestFundamentalObject:
+ *
+ * This object tests regressions...
+ *
+ * Get value func: regress_test_value_get_fundamental_object
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>RegressTestFundamentalObject</name>
+ </identifier>
+ <description>This object tests regressions...</description>
+ <tags>
+ <tag>
+ <name>get value func</name>
+ <description>regress_test_value_get_fundamental_object</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_in.xml b/tests/scanner/annotationparser/gi/annotation_in.xml
new file mode 100644
index 00000000..517f1a3f
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_in.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * annotation_object_in:
+ * @object: a #GObject
+ * @inarg: (in) (transfer none): This is an argument test
+ *
+ * This is a test for in arguments
+ *
+ * Return value: an int
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_in</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>a #GObject</description>
+ </parameter>
+ <parameter>
+ <name>inarg</name>
+ <annotations>
+ <annotation>
+ <name>in</name>
+ </annotation>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>none</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>This is an argument test</description>
+ </parameter>
+ </parameters>
+ <description>This is a test for in arguments</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>an int</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_in_out.xml b/tests/scanner/annotationparser/gi/annotation_in_out.xml
new file mode 100644
index 00000000..c8d36f45
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_in_out.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * annotation_object_inout:
+ * @object: a #GObject
+ * @inoutarg: (inout): This is an argument test
+ * @inoutarg2: (in-out): This is an argument test
+ *
+ * This is a test for inout arguments
+ *
+ * Return value: an int
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_inout</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>a #GObject</description>
+ </parameter>
+ <parameter>
+ <name>inoutarg</name>
+ <annotations>
+ <annotation>
+ <name>inout</name>
+ </annotation>
+ </annotations>
+ <description>This is an argument test</description>
+ </parameter>
+ <parameter>
+ <name>inoutarg2</name>
+ <annotations>
+ <annotation>
+ <name>in-out</name>
+ </annotation>
+ </annotations>
+ <description>This is an argument test</description>
+ </parameter>
+ </parameters>
+ <description>This is a test for inout arguments</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>an int</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_method.xml b/tests/scanner/annotationparser/gi/annotation_method.xml
new file mode 100644
index 00000000..e4d44389
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_method.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * regress_forced_method: (method)
+ * @obj: A #RegressTestObj
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>regress_forced_method</name>
+ <annotations>
+ <annotation>
+ <name>method</name>
+ </annotation>
+ </annotations>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>obj</name>
+ <description>A #RegressTestObj</description>
+ </parameter>
+ </parameters>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_out.xml b/tests/scanner/annotationparser/gi/annotation_out.xml
new file mode 100644
index 00000000..cca5e12e
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_out.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * annotation_object_out:
+ * @object: a #GObject
+ * @outarg: (out): This is an argument test
+ *
+ * This is a test for out arguments
+ *
+ * Return value: an int
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_out</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>a #GObject</description>
+ </parameter>
+ <parameter>
+ <name>outarg</name>
+ <annotations>
+ <annotation>
+ <name>out</name>
+ </annotation>
+ </annotations>
+ <description>This is an argument test</description>
+ </parameter>
+ </parameters>
+ <description>This is a test for out arguments</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>an int</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * regress_test_struct_a_clone:
+ * @a: the structure
+ * @a_out: (out caller-allocates): the cloned structure
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>regress_test_struct_a_clone</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>a</name>
+ <description>the structure</description>
+ </parameter>
+ <parameter>
+ <name>a_out</name>
+ <annotations>
+ <annotation>
+ <name>out</name>
+ <options>
+ <option>
+ <name>caller-allocates</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>the cloned structure</description>
+ </parameter>
+ </parameters>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * regress_test_struct_a_clone:
+ * @a: the structure
+ * @a_out: (out callee-allocates): the cloned structure
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>regress_test_struct_a_clone</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>a</name>
+ <description>the structure</description>
+ </parameter>
+ <parameter>
+ <name>a_out</name>
+ <annotations>
+ <annotation>
+ <name>out</name>
+ <options>
+ <option>
+ <name>callee-allocates</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>the cloned structure</description>
+ </parameter>
+ </parameters>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_ref_func.xml b/tests/scanner/annotationparser/gi/annotation_ref_func.xml
new file mode 100644
index 00000000..7850fc3f
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_ref_func.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <!--
+ "Ref func:" tag syntax
+ -->
+ <commentblock>/**
+ * RegressTestFundamentalObject:
+ *
+ * This object tests regressions...
+ *
+ * Ref func: regress_test_fundamental_object_ref
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>RegressTestFundamentalObject</name>
+ </identifier>
+ <description>This object tests regressions...</description>
+ <tags>
+ <tag>
+ <name>ref func</name>
+ <description>regress_test_fundamental_object_ref</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_rename_to.xml b/tests/scanner/annotationparser/gi/annotation_rename_to.xml
new file mode 100644
index 00000000..390f4878
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_rename_to.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <!--
+ "Rename to:" tag syntax
+ -->
+ <commentblock>/**
+ * annotation_object_watch_full:
+ * @object: A #AnnotationObject
+ * @func: The callback
+ * @user_data: The callback data
+ * @destroy: Destroy notification
+ *
+ * Test overriding via the "Rename To" annotation.
+ *
+ * Rename to: annotation_object_watch
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_watch_full</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>A #AnnotationObject</description>
+ </parameter>
+ <parameter>
+ <name>func</name>
+ <description>The callback</description>
+ </parameter>
+ <parameter>
+ <name>user_data</name>
+ <description>The callback data</description>
+ </parameter>
+ <parameter>
+ <name>destroy</name>
+ <description>Destroy notification</description>
+ </parameter>
+ </parameters>
+ <description>Test overriding via the "Rename To" annotation.</description>
+ <tags>
+ <tag>
+ <name>rename to</name>
+ <description>annotation_object_watch</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_scope.xml b/tests/scanner/annotationparser/gi/annotation_scope.xml
new file mode 100644
index 00000000..7f05a4c6
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_scope.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * annotation_object_foreach:
+ * @object: a #AnnotationObject
+ * @func: (scope call): Callback to invoke
+ * @user_data: Callback user data
+ *
+ * Test taking a call-scoped callback
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_foreach</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>a #AnnotationObject</description>
+ </parameter>
+ <parameter>
+ <name>func</name>
+ <annotations>
+ <annotation>
+ <name>scope</name>
+ <options>
+ <option>
+ <name>call</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>Callback to invoke</description>
+ </parameter>
+ <parameter>
+ <name>user_data</name>
+ <description>Callback user data</description>
+ </parameter>
+ </parameters>
+ <description>Test taking a call-scoped callback</description>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * regress_test_callback_destroy_notify:
+ * @callback: (scope notified):
+ *
+ * Notified - callback persists until a DestroyNotify delegate
+ * is invoked.
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>regress_test_callback_destroy_notify</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>callback</name>
+ <annotations>
+ <annotation>
+ <name>scope</name>
+ <options>
+ <option>
+ <name>notified</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </parameter>
+ </parameters>
+ <description>Notified - callback persists until a DestroyNotify delegate
+is invoked.</description>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * regress_test_callback_async:
+ * @callback: (scope async):
+ *
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>regress_test_callback_async</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>callback</name>
+ <annotations>
+ <annotation>
+ <name>scope</name>
+ <options>
+ <option>
+ <name>async</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </parameter>
+ </parameters>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_set_value_func.xml b/tests/scanner/annotationparser/gi/annotation_set_value_func.xml
new file mode 100644
index 00000000..1f3a44d3
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_set_value_func.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <!--
+ "Set value func:" tag syntax
+ -->
+ <commentblock>/**
+ * RegressTestFundamentalObject:
+ *
+ * This object tests regressions...
+ *
+ * Set value func: regress_test_value_set_fundamental_object
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>RegressTestFundamentalObject</name>
+ </identifier>
+ <description>This object tests regressions...</description>
+ <tags>
+ <tag>
+ <name>set value func</name>
+ <description>regress_test_value_set_fundamental_object</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_skip.xml b/tests/scanner/annotationparser/gi/annotation_skip.xml
new file mode 100644
index 00000000..030b0c42
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_skip.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * annotation_object_watch: (skip)
+ * @object: A #AnnotationObject
+ * @func: The callback
+ * @user_data: The callback data
+ *
+ * This is here just for the sake of being overriden by its
+ * annotation_object_watch_full().
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_watch</name>
+ <annotations>
+ <annotation>
+ <name>skip</name>
+ </annotation>
+ </annotations>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>A #AnnotationObject</description>
+ </parameter>
+ <parameter>
+ <name>func</name>
+ <description>The callback</description>
+ </parameter>
+ <parameter>
+ <name>user_data</name>
+ <description>The callback data</description>
+ </parameter>
+ </parameters>
+ <description>This is here just for the sake of being overriden by its
+annotation_object_watch_full().</description>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_transfer.xml b/tests/scanner/annotationparser/gi/annotation_transfer.xml
new file mode 100644
index 00000000..49df32fd
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_transfer.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * AnnotationObject::list-signal:
+ * @annotation: the annotation object
+ * @list: (type GLib.List) (element-type utf8) (transfer container): a list of strings
+ *
+ * This is a signal which takes a list of strings, but it's not
+ * known by GObject as it's only marked as G_TYPE_POINTER
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>AnnotationObject::list-signal</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>annotation</name>
+ <description>the annotation object</description>
+ </parameter>
+ <parameter>
+ <name>list</name>
+ <annotations>
+ <annotation>
+ <name>type</name>
+ <options>
+ <option>
+ <name>GLib.List</name>
+ </option>
+ </options>
+ </annotation>
+ <annotation>
+ <name>element-type</name>
+ <options>
+ <option>
+ <name>utf8</name>
+ </option>
+ </options>
+ </annotation>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>container</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>a list of strings</description>
+ </parameter>
+ </parameters>
+ <description>This is a signal which takes a list of strings, but it's not
+known by GObject as it's only marked as G_TYPE_POINTER</description>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * annotation_object_in:
+ * @object: a #GObject
+ * @inarg: (in) (transfer none): This is an argument test
+ *
+ * This is a test for in arguments
+ *
+ * Return value: an int
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_in</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>a #GObject</description>
+ </parameter>
+ <parameter>
+ <name>inarg</name>
+ <annotations>
+ <annotation>
+ <name>in</name>
+ </annotation>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>none</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>This is an argument test</description>
+ </parameter>
+ </parameters>
+ <description>This is a test for in arguments</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>an int</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * annotation_transfer_floating:
+ *
+ * Returns: (transfer floating): A floating object
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_transfer_floating</name>
+ </identifier>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <annotations>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>floating</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>A floating object</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ "Transfer:" tag syntax
+ -->
+ <commentblock>/**
+ * FsSession:codecs-without-config:
+ *
+ * This is the same list of codecs as #FsSession:codecs
+ * without....
+ *
+ * Transfer: full
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>FsSession:codecs-without-config</name>
+ </identifier>
+ <description>This is the same list of codecs as #FsSession:codecs
+without....</description>
+ <tags>
+ <tag>
+ <name>transfer</name>
+ <description>full</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_type.xml b/tests/scanner/annotationparser/gi/annotation_type.xml
new file mode 100644
index 00000000..d357423a
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_type.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * AnnotationObject::list-signal:
+ * @annotation: the annotation object
+ * @list: (type GLib.List) (element-type utf8) (transfer container): a list of strings
+ *
+ * This is a signal which takes a list of strings, but it's not
+ * known by GObject as it's only marked as G_TYPE_POINTER
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>AnnotationObject::list-signal</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>annotation</name>
+ <description>the annotation object</description>
+ </parameter>
+ <parameter>
+ <name>list</name>
+ <annotations>
+ <annotation>
+ <name>type</name>
+ <options>
+ <option>
+ <name>GLib.List</name>
+ </option>
+ </options>
+ </annotation>
+ <annotation>
+ <name>element-type</name>
+ <options>
+ <option>
+ <name>utf8</name>
+ </option>
+ </options>
+ </annotation>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>container</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>a list of strings</description>
+ </parameter>
+ </parameters>
+ <description>This is a signal which takes a list of strings, but it's not
+known by GObject as it's only marked as G_TYPE_POINTER</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ "Type:" tag syntax
+ -->
+ <commentblock>/**
+ * RegressTestObj:hash-table:
+ *
+ * Test.
+ *
+ * Type: GLib.HashTable(utf8,gint8)
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>RegressTestObj:hash-table</name>
+ </identifier>
+ <description>Test.</description>
+ <tags>
+ <tag>
+ <name>type</name>
+ <description>GLib.HashTable(utf8,gint8)</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_unref_func.xml b/tests/scanner/annotationparser/gi/annotation_unref_func.xml
new file mode 100644
index 00000000..98ac0a3e
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_unref_func.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <!--
+ "Unref func:" tag syntax
+ -->
+ <commentblock>/**
+ * RegressTestFundamentalObject:
+ *
+ * This object tests regressions...
+ *
+ * Unref func: regress_test_fundamental_object_unref
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>RegressTestFundamentalObject</name>
+ </identifier>
+ <description>This object tests regressions...</description>
+ <tags>
+ <tag>
+ <name>unref func</name>
+ <description>regress_test_fundamental_object_unref</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_value.xml b/tests/scanner/annotationparser/gi/annotation_value.xml
new file mode 100644
index 00000000..4a1a0785
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_value.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <!--
+ "Value:" tag syntax
+ -->
+ <commentblock>/**
+ * ANNOTATION_CALCULATED_LARGE:
+ *
+ * Constant to define a calculated large value
+ *
+ * Value: 10000000000UL
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>ANNOTATION_CALCULATED_LARGE</name>
+ </identifier>
+ <description>Constant to define a calculated large value</description>
+ <tags>
+ <tag>
+ <name>value</name>
+ <description>10000000000UL</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/annotation_virtual.xml b/tests/scanner/annotationparser/gi/annotation_virtual.xml
new file mode 100644
index 00000000..f2b6b23a
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_virtual.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <!--
+ "Virtual:" tag syntax
+ -->
+ <commentblock>/**
+ * foo_object_read:
+ * @object: obj
+ * @offset: offset
+ * @length: length
+ *
+ * Read some stuff.
+ *
+ * Virtual: read_fn
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>foo_object_read</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>obj</description>
+ </parameter>
+ <parameter>
+ <name>offset</name>
+ <description>offset</description>
+ </parameter>
+ <parameter>
+ <name>length</name>
+ <description>length</description>
+ </parameter>
+ </parameters>
+ <description>Read some stuff.</description>
+ <tags>
+ <tag>
+ <name>virtual</name>
+ <description>read_fn</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/syntax.xml b/tests/scanner/annotationparser/gi/syntax.xml
new file mode 100644
index 00000000..f07e4fbd
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/syntax.xml
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <!--
+ Not GTK-Doc
+ -->
+ <commentblock>//Test</commentblock>
+</test>
+
+<test>
+ <!--
+ Not GTK-Doc
+ -->
+ <commentblock>// Test</commentblock>
+</test>
+
+<test>
+ <!--
+ Not GTK-Doc
+ -->
+ <commentblock>/*Test*/</commentblock>
+</test>
+
+<test>
+ <!--
+ Not GTK-Doc
+ -->
+ <commentblock>/* Test */</commentblock>
+</test>
+
+<test>
+ <!--
+ Not GTK-Doc
+ -->
+ <commentblock>/* Test
+something */</commentblock>
+</test>
+
+<test>
+ <!--
+ Not GTK-Doc
+ -->
+ <commentblock>/*
+Test
+something */</commentblock>
+</test>
+
+<test>
+ <!--
+ Not GTK-Doc
+ -->
+ <commentblock>/**Test*/</commentblock>
+</test>
+
+<test>
+ <!--
+ Not GTK-Doc
+ -->
+ <commentblock>/** Test */</commentblock>
+</test>
+
+<test>
+ <!--
+ Not GTK-Doc
+ -->
+ <commentblock>/** Test
+something */</commentblock>
+</test>
+
+<test>
+ <!--
+ Not GTK-Doc
+ -->
+ <commentblock>/**
+*/</commentblock>
+</test>
+
+<test>
+ <!--
+ Technically not GTK-Doc, but we need to support this for backwards compatibility
+ -->
+ <commentblock>/**
+Test
+something */</commentblock>
+ <docblock>
+ <identifier>
+ <name>Test</name>
+ </identifier>
+ <description>something</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ Technically not GTK-Doc, but we need to support this for backwards compatibility
+ -->
+ <commentblock>/**
+Test
+something **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>Test</name>
+ </identifier>
+ <description>something</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ Broken comment block, signal the start of the comment block description followed
+ by a parameter instead.
+ -->
+ <commentblock>/**
+ * SECTION:meepapp
+ *
+ * @short_description: the application class
+ *
+ * The application class handles ...
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:meepapp</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>short_description</name>
+ <description>the application class</description>
+ </parameter>
+ </parameters>
+ <description>The application class handles ...</description>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/syntax_identifier.xml b/tests/scanner/annotationparser/gi/syntax_identifier.xml
new file mode 100644
index 00000000..69dcf328
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/syntax_identifier.xml
@@ -0,0 +1,304 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <!--
+ Identifier part not on the first line.
+ -->
+ <commentblock>/**
+*
+* SECTION:meepapp
+*/</commentblock>
+</test>
+
+<test>
+ <!--
+ Multiple identifier parts
+ -->
+ <commentblock>/**
+ * SECTION:meepapp
+ * SECTION:meepapp2
+ * @short_description: the application class
+ *
+ * The application class handles ...
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:meepapp</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>short_description</name>
+ <description>the application class</description>
+ </parameter>
+ </parameters>
+ <description>SECTION:meepapp2
+The application class handles ...</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ Section documentation including all optional metadata.
+ -->
+ <commentblock>/**
+ * SECTION:meepapp
+ * @short_description: the application class
+ * @title: Meep application
+ * @section_id:
+ * @see_also: #MeepSettings
+ * @stability: Stable
+ * @include: meep/app.h
+ * @image: application.png
+ *
+ * The application class handles ...
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:meepapp</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>short_description</name>
+ <description>the application class</description>
+ </parameter>
+ <parameter>
+ <name>title</name>
+ <description>Meep application</description>
+ </parameter>
+ <parameter>
+ <name>section_id</name>
+ </parameter>
+ <parameter>
+ <name>see_also</name>
+ <description>#MeepSettings</description>
+ </parameter>
+ <parameter>
+ <name>stability</name>
+ <description>Stable</description>
+ </parameter>
+ <parameter>
+ <name>include</name>
+ <description>meep/app.h</description>
+ </parameter>
+ <parameter>
+ <name>image</name>
+ <description>application.png</description>
+ </parameter>
+ </parameters>
+ <description>The application class handles ...</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ Broken comment block with empty line between identifier and parameters parts.
+ -->
+ <commentblock>/**
+ * SECTION:meepapp
+ *
+ * @short_description: the application class
+ * @title: Meep application
+ * @section_id:
+ * @see_also: #MeepSettings
+ * @stability: Stable
+ * @include: meep/app.h
+ * @image: application.png
+ *
+ * The application class handles ...
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:meepapp</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>short_description</name>
+ <description>the application class</description>
+ </parameter>
+ <parameter>
+ <name>title</name>
+ <description>Meep application</description>
+ </parameter>
+ <parameter>
+ <name>section_id</name>
+ </parameter>
+ <parameter>
+ <name>see_also</name>
+ <description>#MeepSettings</description>
+ </parameter>
+ <parameter>
+ <name>stability</name>
+ <description>Stable</description>
+ </parameter>
+ <parameter>
+ <name>include</name>
+ <description>meep/app.h</description>
+ </parameter>
+ <parameter>
+ <name>image</name>
+ <description>application.png</description>
+ </parameter>
+ </parameters>
+ <description>The application class handles ...</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ Broken comment block with description part before parameters part, without empty line.
+ -->
+ <commentblock>/**
+ * SECTION:meepapp
+ *
+ * The application class handles ...
+ * @short_description: the application class
+ * @title: Meep application
+ * @section_id:
+ * @see_also: #MeepSettings
+ * @stability: Stable
+ * @include: meep/app.h
+ * @image: application.png
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:meepapp</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>short_description</name>
+ <description>the application class</description>
+ </parameter>
+ <parameter>
+ <name>title</name>
+ <description>Meep application</description>
+ </parameter>
+ <parameter>
+ <name>section_id</name>
+ </parameter>
+ <parameter>
+ <name>see_also</name>
+ <description>#MeepSettings</description>
+ </parameter>
+ <parameter>
+ <name>stability</name>
+ <description>Stable</description>
+ </parameter>
+ <parameter>
+ <name>include</name>
+ <description>meep/app.h</description>
+ </parameter>
+ <parameter>
+ <name>image</name>
+ <description>application.png</description>
+ </parameter>
+ </parameters>
+ <description>The application class handles ...</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ Broken comment block with description part before parameters part, with empty line.
+ -->
+ <commentblock>/**
+ * SECTION:meepapp
+ *
+ * The application class handles ...
+ *
+ * @short_description: the application class
+ * @title: Meep application
+ * @section_id:
+ * @see_also: #MeepSettings
+ * @stability: Stable
+ * @include: meep/app.h
+ * @image: application.png
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:meepapp</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>short_description</name>
+ <description>the application class</description>
+ </parameter>
+ <parameter>
+ <name>title</name>
+ <description>Meep application</description>
+ </parameter>
+ <parameter>
+ <name>section_id</name>
+ </parameter>
+ <parameter>
+ <name>see_also</name>
+ <description>#MeepSettings</description>
+ </parameter>
+ <parameter>
+ <name>stability</name>
+ <description>Stable</description>
+ </parameter>
+ <parameter>
+ <name>include</name>
+ <description>meep/app.h</description>
+ </parameter>
+ <parameter>
+ <name>image</name>
+ <description>application.png</description>
+ </parameter>
+ </parameters>
+ <description>The application class handles ...</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ Old style implicit returns.
+ https://bugzilla.gnome.org/show_bug.cgi?id=457077
+ -->
+ <commentblock>/**
+ * SECTION:tester
+ * @short_description: module for gtk-doc unit test
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ *
+ * As described in http://bugzilla.gnome.org/show_bug.cgi?id=457077 it
+ * returns nothing.
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:tester</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>short_description</name>
+ <description>module for gtk-doc unit test</description>
+ </parameter>
+ </parameters>
+ <description>This file contains non-sense code for the sole purpose of testing the docs.
+
+As described in http://bugzilla.gnome.org/show_bug.cgi?id=457077 it
+returns nothing.</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ Invalid identifier
+ -->
+ <commentblock>/**
+ * gnm_cell_set_expr_and_value: Stores (WITHOUT COPYING) the supplied value, and
+ * references the supplied expression and links it into the expression
+ * list. It marks the sheet as dirty. It is intended for use by import
+ * routines or operations that do bulk assignment.
+ *
+ * WARNING : This is an internal routine that does not queue redraws,
+ * does not auto-resize, does not calculate spans, and does
+ * not render the value.
+ *
+ * NOTE : This DOES check for array partitioning.
+ */</commentblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/syntax_nested_tags.xml b/tests/scanner/annotationparser/gi/syntax_nested_tags.xml
new file mode 100644
index 00000000..d07b6f12
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/syntax_nested_tags.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <!--
+ Well, not really nested tags as the Since: 2.30 is considered to be part of the
+ description of the @G_APPLICATION_NON_UNIQUE parameter.
+ -->
+ <commentblock>/**
+ * GApplicationFlags:
+ * @G_APPLICATION_NON_UNIQUE: Make no attempts to do any of the typical
+ * single-instance application negotiation, even if the application
+ * ID is given. The application neither attempts to become the
+ * owner of the application ID nor does it check if an existing
+ * owner already exists. Everything occurs in the local process.
+ * Since: 2.30.
+ *
+ * Flags used to define the behaviour of a #GApplication.
+ *
+ * Since: 2.28
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>GApplicationFlags</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>G_APPLICATION_NON_UNIQUE</name>
+ <description>Make no attempts to do any of the typical single-instance application negotiation, even if the application ID is given. The application neither attempts to become the owner of the application ID nor does it check if an existing owner already exists. Everything occurs in the local process. Since: 2.30.</description>
+ </parameter>
+ </parameters>
+ <description>Flags used to define the behaviour of a #GApplication.</description>
+ <tags>
+ <tag>
+ <name>since</name>
+ <description>2.28</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml b/tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml
new file mode 100644
index 00000000..4ae1e036
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <!--
+ All lines (outside program- listings and CDATA sections) just containing
+ a ' *' (blank-asterisk) are converted to paragraph breaks.
+ -->
+ <commentblock>/**
+ * SECTION:test
+ *
+ * The following line is ' *' (blank-asterisk).
+ *
+ * So this is considered a new paragraph.
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:test</name>
+ </identifier>
+ <description>The following line is ' *' (blank-asterisk).
+
+So this is considered a new paragraph.</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ Description: tag, all lines (outside program- listings and CDATA sections) just containing
+ a ' *' (blank-asterisk) are converted to paragraph breaks.
+ -->
+ <commentblock>/**
+ * SECTION:test
+ *
+ * Description: The following line is ' *' (blank-asterisk).
+ *
+ * So this is considered a new paragraph.
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:test</name>
+ </identifier>
+ <description>The following line is ' *' (blank-asterisk).
+
+So this is considered a new paragraph.</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ ' * ' (blank-asterisk-blank) are also converted to paragraph breaks.
+ -->
+ <commentblock>/**
+ * SECTION:test
+ *
+ * The following line is ' * ' (blank-asterisk-blank).
+ *
+ * So this is considered a new paragraph.
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:test</name>
+ </identifier>
+ <description>The following line is ' * ' (blank-asterisk-blank).
+
+So this is considered a new paragraph.</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ Description: tag, ' * ' (blank-asterisk-blank) are also converted to paragraph breaks.
+ -->
+ <commentblock>/**
+ * SECTION:test
+ *
+ * Description: The following line is ' * ' (blank-asterisk-blank).
+ *
+ * So this is considered a new paragraph.
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:test</name>
+ </identifier>
+ <description>The following line is ' * ' (blank-asterisk-blank).
+
+So this is considered a new paragraph.</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ If you want an "empty line" but not a paragraph break, change that into ' * '
+ (blank-asterisk-blank-blank). The "empty line" can be easily recognized in the
+ output as it contains a single space character.
+ -->
+ <commentblock>/**
+ * SECTION:test
+ *
+ * The following line is (blank-asterisk-blank-blank).
+ *
+ * So this is preceded by an empty line and is not considered a new paragraph.
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:test</name>
+ </identifier>
+ <description>The following line is (blank-asterisk-blank-blank).
+
+So this is preceded by an empty line and is not considered a new paragraph.</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ Description: tag, if you want an "empty line" but not a paragraph break, change that into ' * '
+ (blank-asterisk-blank-blank). The "empty line" can be easily recognized in the
+ output as it contains a single space character.
+ -->
+ <commentblock>/**
+ * SECTION:test
+ *
+ * Description: The following line is (blank-asterisk-blank-blank).
+ *
+ * So this is preceded by an empty line and is not considered a new paragraph.
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:test</name>
+ </identifier>
+ <description>The following line is (blank-asterisk-blank-blank).
+
+So this is preceded by an empty line and is not considered a new paragraph.</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ If you want an "empty line" but not a paragraph break, change that into ' * '
+ (blank-asterisk-blank-blank). The "empty line" can be easily recognized in the
+ output as it contains a single space character.
+ -->
+ <commentblock><![CDATA[/**
+ * SECTION:test
+ *
+ * <example>
+ * <title>Iterating over attributes</title>
+ * <programlisting>
+ * void
+ * print_attributes (GIBaseInfo *info)
+ * {
+ * GIAttributeIter iter = { 0, };
+ * char *name;
+ * char *value;
+ *
+ * while (g_base_info_iterate_attributes (info, &iter, &name, &value))
+ * {
+ * g_print ("attribute name: %s value: %s", name, value);
+ * }
+ * }
+ * </programlisting>
+ * </example>
+ */]]></commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:test</name>
+ </identifier>
+ <description><![CDATA[<example>
+<title>Iterating over attributes</title>
+<programlisting>
+void
+print_attributes (GIBaseInfo *info)
+{
+ GIAttributeIter iter = { 0, };
+ char *name;
+ char *value;
+
+ while (g_base_info_iterate_attributes (info, &iter, &name, &value))
+ {
+ g_print ("attribute name: %s value: %s", name, value);
+ }
+}
+</programlisting>
+</example>]]></description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ Description: tag, if you want an "empty line" but not a paragraph break, change that into ' * '
+ (blank-asterisk-blank-blank). The "empty line" can be easily recognized in the
+ output as it contains a single space character.
+ -->
+ <commentblock><![CDATA[/**
+ * SECTION:test
+ *
+ * Description: <example>
+ * <title>Iterating over attributes</title>
+ * <programlisting>
+ * void
+ * print_attributes (GIBaseInfo *info)
+ * {
+ * GIAttributeIter iter = { 0, };
+ * char *name;
+ * char *value;
+ *
+ * while (g_base_info_iterate_attributes (info, &iter, &name, &value))
+ * {
+ * g_print ("attribute name: %s value: %s", name, value);
+ * }
+ * }
+ * </programlisting>
+ * </example>
+ */]]></commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:test</name>
+ </identifier>
+ <description><![CDATA[<example>
+<title>Iterating over attributes</title>
+<programlisting>
+void
+print_attributes (GIBaseInfo *info)
+{
+ GIAttributeIter iter = { 0, };
+ char *name;
+ char *value;
+
+ while (g_base_info_iterate_attributes (info, &iter, &name, &value))
+ {
+ g_print ("attribute name: %s value: %s", name, value);
+ }
+}
+</programlisting>
+</example>]]></description>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/tag_deprecated.xml b/tests/scanner/annotationparser/gi/tag_deprecated.xml
new file mode 100644
index 00000000..6374bf81
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/tag_deprecated.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * annotation_versioned:
+ *
+ * Deprecated: 0.6: Use something else instead
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_versioned</name>
+ </identifier>
+ <tags>
+ <tag>
+ <name>deprecated</name>
+ <description>0.6: Use something else instead</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * annotation_versioned:
+ *
+ * Deprecated: 0.6
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_versioned</name>
+ </identifier>
+ <tags>
+ <tag>
+ <name>deprecated</name>
+ <description>0.6</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/tag_description.xml b/tests/scanner/annotationparser/gi/tag_description.xml
new file mode 100644
index 00000000..75860f60
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/tag_description.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * shiny_function:
+ *
+ * Description: This is a callback with a 'closure' argument that is not named
+ * 'user_data' and hence has to be annotated.
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>shiny_function</name>
+ </identifier>
+ <description>This is a callback with a 'closure' argument that is not named
+'user_data' and hence has to be annotated.</description>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/tag_returns.xml b/tests/scanner/annotationparser/gi/tag_returns.xml
new file mode 100644
index 00000000..302d8cf6
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/tag_returns.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * annotation_object_string_out:
+ *
+ * Test returning a string as an out parameter
+ *
+ * Returns: some boolean
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_string_out</name>
+ </identifier>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>some boolean</description>
+ </tag>
+ </tags>
+ <description>Test returning a string as an out parameter</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ Deprecated "Return value:" tag
+ -->
+ <commentblock>/**
+ * annotation_object_string_out:
+ *
+ * Test returning a string as an out parameter
+ *
+ * Return value: some boolean
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_string_out</name>
+ </identifier>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>some boolean</description>
+ </tag>
+ </tags>
+ <description>Test returning a string as an out parameter</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ Deprecated "@returns" as a parameter
+ -->
+ <commentblock>/**
+ * annotation_object_string_out:
+ * @returns: some boolean
+ *
+ * Test returning a string as an out parameter
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_string_out</name>
+ </identifier>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>some boolean</description>
+ </tag>
+ </tags>
+ <description>Test returning a string as an out parameter</description>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/tag_since.xml b/tests/scanner/annotationparser/gi/tag_since.xml
new file mode 100644
index 00000000..2bd8c5c2
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/tag_since.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * annotation_versioned:
+ *
+ * Since: 0.6
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_versioned</name>
+ </identifier>
+ <tags>
+ <tag>
+ <name>since</name>
+ <description>0.6</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * annotation_versioned:
+ *
+ * Since: this function is available since version 0.6
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_versioned</name>
+ </identifier>
+ <tags>
+ <tag>
+ <name>since</name>
+ <description>this function is available since version 0.6</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>
diff --git a/tests/scanner/annotationparser/gi/tag_stability.xml b/tests/scanner/annotationparser/gi/tag_stability.xml
new file mode 100644
index 00000000..154b8385
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/tag_stability.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * annotation_versioned:
+ *
+ * Stability: Stable
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_versioned</name>
+ </identifier>
+ <tags>
+ <tag>
+ <name>stability</name>
+ <description>Stable</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * annotation_versioned:
+ *
+ * Stability: Unstable
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_versioned</name>
+ </identifier>
+ <tags>
+ <tag>
+ <name>stability</name>
+ <description>Unstable</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * annotation_versioned:
+ *
+ * Stability: Private
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_versioned</name>
+ </identifier>
+ <tags>
+ <tag>
+ <name>stability</name>
+ <description>Private</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+<test>
+ <commentblock>/**
+ * annotation_versioned:
+ *
+ * Stability: behavior tends to vary depending on the phase of the moon.
+ **/</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_versioned</name>
+ </identifier>
+ <tags>
+ <tag>
+ <name>stability</name>
+ <description>behavior tends to vary depending on the phase of the moon.</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>