diff options
author | Mark Doffman <mark.doffman@codethink.co.uk> | 2014-03-27 20:50:21 +0000 |
---|---|---|
committer | Mark Doffman <mark.doffman@codethink.co.uk> | 2014-03-27 20:50:21 +0000 |
commit | 68ff94340891f1ae4ea24546acdbbc39c4dcbcd0 (patch) | |
tree | 46f02cba671bcb321482c7961acd91aeee57ced5 /tests/scanner/annotationparser/gtkdoc/annotations | |
parent | 19da3f81593614198206c45527f973a22cdd621e (diff) | |
parent | 89e84d06dffbc732bac26a105244b7270c42e3ec (diff) | |
download | gobject-introspection-baserock/markdoffman/1_39_90-merge.tar.gz |
Merge tag 'GOBJECT_INTROSPECTION_1_39_90' into baserock/markdoffman/1_39_90-mergebaserock/markdoffman/1_39_90-merge
Tag 1_39_90
Conflicts:
autogen.sh
configure.ac
Diffstat (limited to 'tests/scanner/annotationparser/gtkdoc/annotations')
-rw-r--r-- | tests/scanner/annotationparser/gtkdoc/annotations/tester.c.xml | 482 | ||||
-rw-r--r-- | tests/scanner/annotationparser/gtkdoc/annotations/tester.h.xml | 39 |
2 files changed, 521 insertions, 0 deletions
diff --git a/tests/scanner/annotationparser/gtkdoc/annotations/tester.c.xml b/tests/scanner/annotationparser/gtkdoc/annotations/tester.c.xml new file mode 100644 index 00000000..d28d5d9b --- /dev/null +++ b/tests/scanner/annotationparser/gtkdoc/annotations/tester.c.xml @@ -0,0 +1,482 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test"> + +<test> + <input>/** + * SECTION:tester + * @short_description: module for gtk-doc unit test + * + * This file contains non-sense code for the sole purpose of testing the docs. + */</input> + <parser> + <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.</description> + </docblock> + </parser> + <output>/** + * SECTION:tester + * @short_description: module for gtk-doc unit test + * + * This file contains non-sense code for the sole purpose of testing the docs. + */</output> +</test> + +<test> + <input>/** + * annotation_array_length: + * @list: a #GtkListStore + * @n_columns: number of columns + * @types: (array length=n_columns): list of types + * + * Document parameter relation for array length. + */</input> + <parser> + <docblock> + <identifier> + <name>annotation_array_length</name> + </identifier> + <parameters> + <parameter> + <name>list</name> + <description>a #GtkListStore</description> + </parameter> + <parameter> + <name>n_columns</name> + <description>number of columns</description> + </parameter> + <parameter> + <name>types</name> + <annotations> + <annotation> + <name>array</name> + <options> + <option> + <name>length</name> + <value>n_columns</value> + </option> + </options> + </annotation> + </annotations> + <description>list of types</description> + </parameter> + </parameters> + <description>Document parameter relation for array length.</description> + </docblock> + </parser> + <output>/** + * annotation_array_length: + * @list: a #GtkListStore + * @n_columns: number of columns + * @types: (array length=n_columns): list of types + * + * Document parameter relation for array length. + */</output> +</test> + +<test> + <input>/** + * annotation_nullable: + * @uri: a uri + * @label: (allow-none): an optional string, which is used in ways too + * complicated to describe in a single line, making it necessary to wrap it + * + * Document optional parameters. + * + * Returns: (transfer full) (allow-none): Returns stuff which you have to + * free after use, whose description is also rather long + */</input> + <parser> + <docblock> + <identifier> + <name>annotation_nullable</name> + </identifier> + <parameters> + <parameter> + <name>uri</name> + <description>a uri</description> + </parameter> + <parameter> + <name>label</name> + <annotations> + <annotation> + <name>allow-none</name> + </annotation> + </annotations> + <description>an optional string, which is used in ways too + complicated to describe in a single line, making it necessary to wrap it</description> + </parameter> + </parameters> + <description>Document optional parameters.</description> + <tags> + <tag> + <name>returns</name> + <annotations> + <annotation> + <name>transfer</name> + <options> + <option> + <name>full</name> + </option> + </options> + </annotation> + <annotation> + <name>allow-none</name> + </annotation> + </annotations> + <description>Returns stuff which you have to + free after use, whose description is also rather long</description> + </tag> + </tags> + </docblock> + </parser> + <output>/** + * annotation_nullable: + * @uri: a uri + * @label: (allow-none): an optional string, which is used in ways too + * complicated to describe in a single line, making it necessary to wrap it + * + * Document optional parameters. + * + * Returns: (transfer full) (allow-none): Returns stuff which you have to + * free after use, whose description is also rather long + */</output> +</test> + +<test> + <input>/** + * annotation_elementtype: + * @list: (element-type GObject): list of #GObject instances to search + * + * Document optional parameters. + * + * Returns: %TRUE for success + */</input> + <parser> + <docblock> + <identifier> + <name>annotation_elementtype</name> + </identifier> + <parameters> + <parameter> + <name>list</name> + <annotations> + <annotation> + <name>element-type</name> + <options> + <option> + <name>GObject</name> + </option> + </options> + </annotation> + </annotations> + <description>list of #GObject instances to search</description> + </parameter> + </parameters> + <description>Document optional parameters.</description> + <tags> + <tag> + <name>returns</name> + <description>%TRUE for success</description> + </tag> + </tags> + </docblock> + </parser> + <output>/** + * annotation_elementtype: + * @list: (element-type GObject): list of #GObject instances to search + * + * Document optional parameters. + * + * Returns: %TRUE for success + */</output> +</test> + +<test> + <input>/** + * annotation_elementtype_transfer: + * @list: (element-type utf8) (transfer full): list of #GObject instances to search + * + * Document optional parameters. + * + * Returns: %TRUE for success + */</input> + <parser> + <docblock> + <identifier> + <name>annotation_elementtype_transfer</name> + </identifier> + <parameters> + <parameter> + <name>list</name> + <annotations> + <annotation> + <name>element-type</name> + <options> + <option> + <name>utf8</name> + </option> + </options> + </annotation> + <annotation> + <name>transfer</name> + <options> + <option> + <name>full</name> + </option> + </options> + </annotation> + </annotations> + <description>list of #GObject instances to search</description> + </parameter> + </parameters> + <description>Document optional parameters.</description> + <tags> + <tag> + <name>returns</name> + <description>%TRUE for success</description> + </tag> + </tags> + </docblock> + </parser> + <output>/** + * annotation_elementtype_transfer: + * @list: (element-type utf8) (transfer full): list of #GObject instances to search + * + * Document optional parameters. + * + * Returns: %TRUE for success + */</output> +</test> + +<test> + <input>/** + * annotation_elementtype_returns: + * + * Document optional parameters. + * + * Returns: (element-type GObject): A list of #GObject instances. + */</input> + <parser> + <docblock> + <identifier> + <name>annotation_elementtype_returns</name> + </identifier> + <description>Document optional parameters.</description> + <tags> + <tag> + <name>returns</name> + <annotations> + <annotation> + <name>element-type</name> + <options> + <option> + <name>GObject</name> + </option> + </options> + </annotation> + </annotations> + <description>A list of #GObject instances.</description> + </tag> + </tags> + </docblock> + </parser> + <output>/** + * annotation_elementtype_returns: + * + * Document optional parameters. + * + * Returns: (element-type GObject): A list of #GObject instances. + */</output> +</test> + +<test> + <input>/** + * annotation_outparams: + * @list: (out) (transfer none): a pointer to take a list + * + * Document optional parameters. + * + * Returns: %TRUE for success + */</input> + <parser> + <docblock> + <identifier> + <name>annotation_outparams</name> + </identifier> + <parameters> + <parameter> + <name>list</name> + <annotations> + <annotation> + <name>out</name> + </annotation> + <annotation> + <name>transfer</name> + <options> + <option> + <name>none</name> + </option> + </options> + </annotation> + </annotations> + <description>a pointer to take a list</description> + </parameter> + </parameters> + <description>Document optional parameters.</description> + <tags> + <tag> + <name>returns</name> + <description>%TRUE for success</description> + </tag> + </tags> + </docblock> + </parser> + <output>/** + * annotation_outparams: + * @list: (out) (transfer none): a pointer to take a list + * + * Document optional parameters. + * + * Returns: %TRUE for success + */</output> +</test> + +<test> + <input>/** + * annotation_skip: (skip) + * @list: a pointer to take a list + * + * Documentation for this function. + */</input> + <parser> + <docblock> + <identifier> + <name>annotation_skip</name> + <annotations> + <annotation> + <name>skip</name> + </annotation> + </annotations> + </identifier> + <parameters> + <parameter> + <name>list</name> + <description>a pointer to take a list</description> + </parameter> + </parameters> + <description>Documentation for this function.</description> + </docblock> + </parser> + <output>/** + * annotation_skip: (skip) + * @list: a pointer to take a list + * + * Documentation for this function. + */</output> +</test> + +<test> + <input>/** + * annotation_skip_return: (skip) + * @list: a pointer to take a list + * + * Documentation for this function. + * + * Returns: (skip): %TRUE for success + */</input> + <parser> + <docblock> + <identifier> + <name>annotation_skip_return</name> + <annotations> + <annotation> + <name>skip</name> + </annotation> + </annotations> + </identifier> + <parameters> + <parameter> + <name>list</name> + <description>a pointer to take a list</description> + </parameter> + </parameters> + <description>Documentation for this function.</description> + <tags> + <tag> + <name>returns</name> + <annotations> + <annotation> + <name>skip</name> + </annotation> + </annotations> + <description>%TRUE for success</description> + </tag> + </tags> + </docblock> + </parser> + <output>/** + * annotation_skip_return: (skip) + * @list: a pointer to take a list + * + * Documentation for this function. + * + * Returns: (skip): %TRUE for success + */</output> +</test> + +<test> + <input>/** + * annotation_scope: + * @callback: (scope async): a callback + * @user_data: data to pass to callback + * + * Documentation for this function. + */</input> + <parser> + <docblock> + <identifier> + <name>annotation_scope</name> + </identifier> + <parameters> + <parameter> + <name>callback</name> + <annotations> + <annotation> + <name>scope</name> + <options> + <option> + <name>async</name> + </option> + </options> + </annotation> + </annotations> + <description>a callback</description> + </parameter> + <parameter> + <name>user_data</name> + <description>data to pass to callback</description> + </parameter> + </parameters> + <description>Documentation for this function.</description> + </docblock> + </parser> + <output>/** + * annotation_scope: + * @callback: (scope async): a callback + * @user_data: data to pass to callback + * + * Documentation for this function. + */</output> +</test> + +</tests> diff --git a/tests/scanner/annotationparser/gtkdoc/annotations/tester.h.xml b/tests/scanner/annotationparser/gtkdoc/annotations/tester.h.xml new file mode 100644 index 00000000..0917cd95 --- /dev/null +++ b/tests/scanner/annotationparser/gtkdoc/annotations/tester.h.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test"> + +<test> + <input>/** + * GtkdocAnnotation: + * @that: (allow-none): eventualy points to something + * + * small struct + */</input> + <parser> + <docblock> + <identifier> + <name>GtkdocAnnotation</name> + </identifier> + <parameters> + <parameter> + <name>that</name> + <annotations> + <annotation> + <name>allow-none</name> + </annotation> + </annotations> + <description>eventualy points to something</description> + </parameter> + </parameters> + <description>small struct</description> + </docblock> + </parser> + <output>/** + * GtkdocAnnotation: + * @that: (allow-none): eventualy points to something + * + * small struct + */</output> +</test> + +</tests> |