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/gobject | |
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/gobject')
6 files changed, 1347 insertions, 0 deletions
diff --git a/tests/scanner/annotationparser/gtkdoc/gobject/giface.c.xml b/tests/scanner/annotationparser/gtkdoc/gobject/giface.c.xml new file mode 100644 index 00000000..c295edbc --- /dev/null +++ b/tests/scanner/annotationparser/gtkdoc/gobject/giface.c.xml @@ -0,0 +1,197 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test"> + +<test> + <input><![CDATA[/** + * SECTION:iface + * @title: GtkdocIface + * @short_description: interface for gtk-doc unit test + * @see_also: #GtkdocObject + * + * This file contains non-sense code for the sole purpose of testing the docs. + * We can link to the #GtkdocIface:itest property and the #GtkdocIface::itest + * signal. + * An instance can be configured using the gtkdoc_iface_configure() function. + * + * I can haz pictures too! + * <mediaobject> + * <imageobject><imagedata fileref="home.png" format="PNG"/></imageobject> + * <caption><para>Home sweet home.</para></caption> + * </mediaobject> + * + * Just incase you wonder, special caracters can be escaped with a \ like in \% + * or \# or even \@. + */]]></input> + <parser> + <docblock> + <identifier> + <name>SECTION:iface</name> + </identifier> + <parameters> + <parameter> + <name>title</name> + <description>GtkdocIface</description> + </parameter> + <parameter> + <name>short_description</name> + <description>interface for gtk-doc unit test</description> + </parameter> + <parameter> + <name>see_also</name> + <description>#GtkdocObject</description> + </parameter> + </parameters> + <description><![CDATA[This file contains non-sense code for the sole purpose of testing the docs. +We can link to the #GtkdocIface:itest property and the #GtkdocIface::itest +signal. +An instance can be configured using the gtkdoc_iface_configure() function. + +I can haz pictures too! +<mediaobject> + <imageobject><imagedata fileref="home.png" format="PNG"/></imageobject> + <caption><para>Home sweet home.</para></caption> +</mediaobject> + +Just incase you wonder, special caracters can be escaped with a \ like in \% +or \# or even \@.]]></description> + </docblock> + </parser> + <output><![CDATA[/** + * SECTION:iface + * @title: GtkdocIface + * @short_description: interface for gtk-doc unit test + * @see_also: #GtkdocObject + * + * This file contains non-sense code for the sole purpose of testing the docs. + * We can link to the #GtkdocIface:itest property and the #GtkdocIface::itest + * signal. + * An instance can be configured using the gtkdoc_iface_configure() function. + * + * I can haz pictures too! + * <mediaobject> + * <imageobject><imagedata fileref="home.png" format="PNG"/></imageobject> + * <caption><para>Home sweet home.</para></caption> + * </mediaobject> + * + * Just incase you wonder, special caracters can be escaped with a \ like in \% + * or \# or even \@. + */]]></output> +</test> + +<test> + <input>/** + * SECTION:iface2 + * @title: GtkdocIface2 + * @short_description: interface with a prerequisite for gtk-doc unit test + * @see_also: #GtkdocObject, #GtkdocIface + * + * This file contains non-sense code for the sole purpose of testing the docs. + */</input> + <parser> + <docblock> + <identifier> + <name>SECTION:iface2</name> + </identifier> + <parameters> + <parameter> + <name>title</name> + <description>GtkdocIface2</description> + </parameter> + <parameter> + <name>short_description</name> + <description>interface with a prerequisite for gtk-doc unit test</description> + </parameter> + <parameter> + <name>see_also</name> + <description>#GtkdocObject, #GtkdocIface</description> + </parameter> + </parameters> + <description>This file contains non-sense code for the sole purpose of testing the docs.</description> + </docblock> + </parser> + <output>/** + * SECTION:iface2 + * @title: GtkdocIface2 + * @short_description: interface with a prerequisite for gtk-doc unit test + * @see_also: #GtkdocObject, #GtkdocIface + * + * This file contains non-sense code for the sole purpose of testing the docs. + */</output> +</test> + +<test> + <input>/** + * gtkdoc_iface_configure: + * @config: settings + * + * Configure a new instance + * + * Returns: %TRUE for sucess or %FALSE in case of an error + * Since: 0.1 + */</input> + <parser> + <docblock> + <identifier> + <name>gtkdoc_iface_configure</name> + </identifier> + <parameters> + <parameter> + <name>config</name> + <description>settings</description> + </parameter> + </parameters> + <description>Configure a new instance</description> + <tags> + <tag> + <name>returns</name> + <description>%TRUE for sucess or %FALSE in case of an error</description> + </tag> + <tag> + <name>since</name> + <value>0.1</value> + </tag> + </tags> + </docblock> + </parser> + <output>/** + * gtkdoc_iface_configure: + * @config: settings + * + * Configure a new instance + * + * Returns: %TRUE for sucess or %FALSE in case of an error + * Since: 0.1 + */</output> +</test> + +<test> + <input>/** + * GtkdocIface::itest: + * @self: myself + * + * The event has been triggered. + */</input> + <parser> + <docblock> + <identifier> + <name>GtkdocIface::itest</name> + </identifier> + <parameters> + <parameter> + <name>self</name> + <description>myself</description> + </parameter> + </parameters> + <description>The event has been triggered.</description> + </docblock> + </parser> + <output> /** + * GtkdocIface::itest: + * @self: myself + * + * The event has been triggered. + */</output> +</test> + +</tests> diff --git a/tests/scanner/annotationparser/gtkdoc/gobject/giface.h.xml b/tests/scanner/annotationparser/gtkdoc/gobject/giface.h.xml new file mode 100644 index 00000000..e3ed09ca --- /dev/null +++ b/tests/scanner/annotationparser/gtkdoc/gobject/giface.h.xml @@ -0,0 +1,162 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test"> + +<test> + <input>/** + * GtkdocIface: + * + * opaque instance of gtk-doc unit test interface + */</input> + <parser> + <docblock> + <identifier> + <name>GtkdocIface</name> + </identifier> + <description>opaque instance of gtk-doc unit test interface</description> + </docblock> + </parser> + <output>/** + * GtkdocIface: + * + * opaque instance of gtk-doc unit test interface + */</output> +</test> + +<test> + <input>/** + * GtkdocIface2: + * + * opaque instance of gtk-doc unit test interface + */</input> + <parser> + <docblock> + <identifier> + <name>GtkdocIface2</name> + </identifier> + <description>opaque instance of gtk-doc unit test interface</description> + </docblock> + </parser> + <output>/** + * GtkdocIface2: + * + * opaque instance of gtk-doc unit test interface + */</output> +</test> + +<test> + <input>/** + * GtkdocIfaceInterface: + * @parent: this is a bug :/ + * @test: overideable method + * + * class data of gtk-doc unit test interface + */</input> + <parser> + <docblock> + <identifier> + <name>GtkdocIfaceInterface</name> + </identifier> + <parameters> + <parameter> + <name>parent</name> + <description>this is a bug :/</description> + </parameter> + <parameter> + <name>test</name> + <description>overideable method</description> + </parameter> + </parameters> + <description>class data of gtk-doc unit test interface</description> + </docblock> + </parser> + <output>/** + * GtkdocIfaceInterface: + * @parent: this is a bug :/ + * @test: overideable method + * + * class data of gtk-doc unit test interface + */</output> +</test> + +<test> + <input>/** + * GTKDOC_IFACE_MACRO_DUMMY: + * @parameter_1: first arg + * @parameter_2: second arg + * + * This macro does nothing. + */</input> + <parser> + <docblock> + <identifier> + <name>GTKDOC_IFACE_MACRO_DUMMY</name> + </identifier> + <parameters> + <parameter> + <name>parameter_1</name> + <description>first arg</description> + </parameter> + <parameter> + <name>parameter_2</name> + <description>second arg</description> + </parameter> + </parameters> + <description>This macro does nothing.</description> + </docblock> + </parser> + <output>/** + * GTKDOC_IFACE_MACRO_DUMMY: + * @parameter_1: first arg + * @parameter_2: second arg + * + * This macro does nothing. + */</output> +</test> + +<test> + <input>/** + * GTKDOC_IFACE_MACRO_SUM: + * @parameter_1: first arg + * @parameter_2: second arg + * + * This macro adds its args. + * + * Returns: the sum of @parameter_1 and @parameter_2 + */</input> + <parser> + <docblock> + <identifier> + <name>GTKDOC_IFACE_MACRO_SUM</name> + </identifier> + <parameters> + <parameter> + <name>parameter_1</name> + <description>first arg</description> + </parameter> + <parameter> + <name>parameter_2</name> + <description>second arg</description> + </parameter> + </parameters> + <description>This macro adds its args.</description> + <tags> + <tag> + <name>returns</name> + <description>the sum of @parameter_1 and @parameter_2</description> + </tag> + </tags> + </docblock> + </parser> + <output>/** + * GTKDOC_IFACE_MACRO_SUM: + * @parameter_1: first arg + * @parameter_2: second arg + * + * This macro adds its args. + * + * Returns: the sum of @parameter_1 and @parameter_2 + */</output> +</test> + +</tests> diff --git a/tests/scanner/annotationparser/gtkdoc/gobject/gobject.c.xml b/tests/scanner/annotationparser/gtkdoc/gobject/gobject.c.xml new file mode 100644 index 00000000..b54a1a74 --- /dev/null +++ b/tests/scanner/annotationparser/gtkdoc/gobject/gobject.c.xml @@ -0,0 +1,616 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test"> + +<test> + <input><![CDATA[/** + * SECTION:object + * @title: GtkdocObject + * @short_description: class for gtk-doc unit test + * @see_also: #GtkdocIface + * @Image: object.png + * + * This file contains non-sense code for the sole purpose of testing the docs. + * We can link to the #GtkdocObject:otest property and the #GtkdocObject::otest + * signal. + * + * When subclassing it is useful to override the #GtkdocObjectClass.test() + * method. The #GtkdocObjectClass.foo_bar() vmethod lets you refine your + * frobnicator. + * + * A new instance can be created using the gtkdoc_object_new() function. The + * whole lifecycle usualy looks like shown in this example: + * |[{{!-- language="C" --!}} + * GObject *myobj; + * + * myobj = gtkdoc_object_new(); + * // do somehing + * g_object_unref (myobj); + * ]| + * + * # Examples # + * + * You can also change parameters: + * <informalexample> + * <programlisting language="c"><xi:include xmlns:xi="http://www.w3.org/2003/XInclude" parse="text" href="../../examples/gobject.c" /></programlisting> + * </informalexample> + * + * This example serves two main purposes: + * - testing conversion (long description + * follows here) + * - catching bugs + * - having an example + * + * Nothing more to say. + */]]></input> + <parser> + <docblock> + <identifier> + <name>SECTION:object</name> + </identifier> + <parameters> + <parameter> + <name>title</name> + <description>GtkdocObject</description> + </parameter> + <parameter> + <name>short_description</name> + <description>class for gtk-doc unit test</description> + </parameter> + <parameter> + <name>see_also</name> + <description>#GtkdocIface</description> + </parameter> + <parameter> + <name>Image</name> + <description>object.png</description> + </parameter> + </parameters> + <description><![CDATA[This file contains non-sense code for the sole purpose of testing the docs. +We can link to the #GtkdocObject:otest property and the #GtkdocObject::otest +signal. + +When subclassing it is useful to override the #GtkdocObjectClass.test() +method. The #GtkdocObjectClass.foo_bar() vmethod lets you refine your +frobnicator. + +A new instance can be created using the gtkdoc_object_new() function. The +whole lifecycle usualy looks like shown in this example: +|[{{!-- language="C" --!}} +GObject *myobj; + +myobj = gtkdoc_object_new(); +// do somehing +g_object_unref (myobj); +]| + +# Examples # + +You can also change parameters: +<informalexample> +<programlisting language="c"><xi:include xmlns:xi="http://www.w3.org/2003/XInclude" parse="text" href="../../examples/gobject.c" /></programlisting> +</informalexample> + +This example serves two main purposes: +- testing conversion (long description + follows here) +- catching bugs +- having an example + +Nothing more to say.]]></description> + </docblock> + </parser> + <output><![CDATA[/** + * SECTION:object + * @title: GtkdocObject + * @short_description: class for gtk-doc unit test + * @see_also: #GtkdocIface + * @Image: object.png + * + * This file contains non-sense code for the sole purpose of testing the docs. + * We can link to the #GtkdocObject:otest property and the #GtkdocObject::otest + * signal. + * + * When subclassing it is useful to override the #GtkdocObjectClass.test() + * method. The #GtkdocObjectClass.foo_bar() vmethod lets you refine your + * frobnicator. + * + * A new instance can be created using the gtkdoc_object_new() function. The + * whole lifecycle usualy looks like shown in this example: + * |[{{!-- language="C" --!}} + * GObject *myobj; + * + * myobj = gtkdoc_object_new(); + * // do somehing + * g_object_unref (myobj); + * ]| + * + * # Examples # + * + * You can also change parameters: + * <informalexample> + * <programlisting language="c"><xi:include xmlns:xi="http://www.w3.org/2003/XInclude" parse="text" href="../../examples/gobject.c" /></programlisting> + * </informalexample> + * + * This example serves two main purposes: + * - testing conversion (long description + * follows here) + * - catching bugs + * - having an example + * + * Nothing more to say. + */]]></output> +</test> + +<test> + <input>/** + * SECTION:object2 + * @title: GtkdocObject2 + * @short_description: class with interface for gtk-doc unit test + * @see_also: #GtkdocIface + * + * This file contains non-sense code for the sole purpose of testing the docs. + * + * Internals + * ========= + * + * All the internal details go here or not: + * - single item list + */</input> + <parser> + <docblock> + <identifier> + <name>SECTION:object2</name> + </identifier> + <parameters> + <parameter> + <name>title</name> + <description>GtkdocObject2</description> + </parameter> + <parameter> + <name>short_description</name> + <description>class with interface for gtk-doc unit test</description> + </parameter> + <parameter> + <name>see_also</name> + <description>#GtkdocIface</description> + </parameter> + </parameters> + <description>This file contains non-sense code for the sole purpose of testing the docs. + +Internals +========= + +All the internal details go here or not: +- single item list</description> + </docblock> + </parser> + <output>/** + * SECTION:object2 + * @title: GtkdocObject2 + * @short_description: class with interface for gtk-doc unit test + * @see_also: #GtkdocIface + * + * This file contains non-sense code for the sole purpose of testing the docs. + * + * Internals + * ========= + * + * All the internal details go here or not: + * - single item list + */</output> +</test> + +<test> + <input><![CDATA[/** + * gtkdoc_object_new: + * + * Create a new instance + * <note><para> + * This will only work if you have called g_type_init() before. + * </para></note> + * + * Returns: the instance or %NULL in case of an error + * Since: 0.1 + */]]></input> + <parser> + <docblock> + <identifier> + <name>gtkdoc_object_new</name> + </identifier> + <description><![CDATA[Create a new instance +<note><para> + This will only work if you have called g_type_init() before. +</para></note>]]></description> + <tags> + <tag> + <name>returns</name> + <description>the instance or %NULL in case of an error</description> + </tag> + <tag> + <name>since</name> + <value>0.1</value> + </tag> + </tags> + </docblock> + </parser> + <output><![CDATA[/** + * gtkdoc_object_new: + * + * Create a new instance + * <note><para> + * This will only work if you have called g_type_init() before. + * </para></note> + * + * Returns: the instance or %NULL in case of an error + * Since: 0.1 + */]]></output> +</test> + +<test> + <input><![CDATA[/** + * gtkdoc_object_set_otest: + * @self: the object + * @value: the new otest value, whose description extends further than one + * line will allow + * + * Set the #GtkdocObject:otest property. This is a long paragraph. + * + * Oh, btw. setting the property directly saves us one method. + * + * Deprecated: Use g_object_set(obj,"otest",value,NULL); instead. + * Since: 0.5 + */]]></input> + <parser> + <docblock> + <identifier> + <name>gtkdoc_object_set_otest</name> + </identifier> + <parameters> + <parameter> + <name>self</name> + <description>the object</description> + </parameter> + <parameter> + <name>value</name> + <description>the new otest value, whose description extends further than one + line will allow</description> + </parameter> + </parameters> + <description>Set the #GtkdocObject:otest property. This is a long paragraph. + +Oh, btw. setting the property directly saves us one method.</description> + <tags> + <tag> + <name>deprecated</name> + <description><![CDATA[Use g_object_set(obj,"otest",value,NULL); instead.]]></description> + </tag> + <tag> + <name>since</name> + <value>0.5</value> + </tag> + </tags> + </docblock> + </parser> + <output><![CDATA[/** + * gtkdoc_object_set_otest: + * @self: the object + * @value: the new otest value, whose description extends further than one + * line will allow + * + * Set the #GtkdocObject:otest property. This is a long paragraph. + * + * Oh, btw. setting the property directly saves us one method. + * + * Deprecated: Use g_object_set(obj,"otest",value,NULL); instead. + * Since: 0.5 + */]]></output> +</test> + +<test> + <input><![CDATA[/** + * gtkdoc_object_frobnicate: + * @self: the object + * @n: number of iterations + * + * Frobnicate the content of @self @n times. This implements a + * complex algorithm (http://en.wikipedia.org/wiki/Algorithm). + * <footnote> + * <para> + * Negative frobnication can lead to unexpected behaviour. + * </para> + * </footnote> + * + * Since: 0.5 + */]]></input> + <parser> + <docblock> + <identifier> + <name>gtkdoc_object_frobnicate</name> + </identifier> + <parameters> + <parameter> + <name>self</name> + <description>the object</description> + </parameter> + <parameter> + <name>n</name> + <description>number of iterations</description> + </parameter> + </parameters> + <description><![CDATA[Frobnicate the content of @self @n times. This implements a +complex algorithm (http://en.wikipedia.org/wiki/Algorithm). +<footnote> + <para> + Negative frobnication can lead to unexpected behaviour. + </para> +</footnote>]]></description> + <tags> + <tag> + <name>since</name> + <value>0.5</value> + </tag> + </tags> + </docblock> + </parser> + <output><![CDATA[/** + * gtkdoc_object_frobnicate: + * @self: the object + * @n: number of iterations + * + * Frobnicate the content of @self @n times. This implements a + * complex algorithm (http://en.wikipedia.org/wiki/Algorithm). + * <footnote> + * <para> + * Negative frobnication can lead to unexpected behaviour. + * </para> + * </footnote> + * + * Since: 0.5 + */]]></output> +</test> + +<test> + <input>/** + * gtkdoc_object_fooify: + * @self: the object + * @...: a NULL terminated list of arguments + * + * Fooify the content of @self. + * + * Returns: %TRUE for success + */</input> + <parser> + <docblock> + <identifier> + <name>gtkdoc_object_fooify</name> + </identifier> + <parameters> + <parameter> + <name>self</name> + <description>the object</description> + </parameter> + <parameter> + <name>...</name> + <description>a NULL terminated list of arguments</description> + </parameter> + </parameters> + <description>Fooify the content of @self.</description> + <tags> + <tag> + <name>returns</name> + <description>%TRUE for success</description> + </tag> + </tags> + </docblock> + </parser> + <output>/** + * gtkdoc_object_fooify: + * @self: the object + * @...: a NULL terminated list of arguments + * + * Fooify the content of @self. + * + * Returns: %TRUE for success + */</output> +</test> + +<test> + <input>/** + * GtkdocObject::otest: + * @self: myself + * + * The event has been triggered. + */</input> + <parser> + <docblock> + <identifier> + <name>GtkdocObject::otest</name> + </identifier> + <parameters> + <parameter> + <name>self</name> + <description>myself</description> + </parameter> + </parameters> + <description>The event has been triggered.</description> + </docblock> + </parser> + <output> /** + * GtkdocObject::otest: + * @self: myself + * + * The event has been triggered. + */</output> +</test> + +<test> + <input>/** + * GtkdocObject::dep-otest: + * @self: myself + * + * Here's an example signal handler. + * |[ + * static gchar* + * otest_callback (GObject *o, + * gpointer user_data) + * { + * gdouble value; + * + * value = abs (o->value); + * + * return value; + * } + * ]| + * + * Deprecated: Use the #GtkdocObject::otest signal instead. + */</input> + <parser> + <docblock> + <identifier> + <name>GtkdocObject::dep-otest</name> + </identifier> + <parameters> + <parameter> + <name>self</name> + <description>myself</description> + </parameter> + </parameters> + <description>Here's an example signal handler. +|[ +static gchar* +otest_callback (GObject *o, + gpointer user_data) +{ + gdouble value; + + value = abs (o->value); + + return value; +} +]|</description> + <tags> + <tag> + <name>deprecated</name> + <description>Use the #GtkdocObject::otest signal instead.</description> + </tag> + </tags> + </docblock> + </parser> + <output> /** + * GtkdocObject::dep-otest: + * @self: myself + * + * Here's an example signal handler. + * |[ + * static gchar* + * otest_callback (GObject *o, + * gpointer user_data) + * { + * gdouble value; + * + * value = abs (o->value); + * + * return value; + * } + * ]| + * + * Deprecated: Use the #GtkdocObject::otest signal instead. + */</output> +</test> + +<test> + <input>/** + * GtkdocObject::strings-changed: + * + * Something has happened. + */</input> + <parser> + <docblock> + <identifier> + <name>GtkdocObject::strings-changed</name> + </identifier> + <description>Something has happened.</description> + </docblock> + </parser> + <output> /** + * GtkdocObject::strings-changed: + * + * Something has happened. + */</output> +</test> + +<test> + <input>/** + * GtkdocObject::variant-changed: + * + * Something has happened. + */</input> + <parser> + <docblock> + <identifier> + <name>GtkdocObject::variant-changed</name> + </identifier> + <description>Something has happened.</description> + </docblock> + </parser> + <output> /** + * GtkdocObject::variant-changed: + * + * Something has happened. + */</output> +</test> + +<test> + <input>/** + * GtkdocObject:otest: + * + * Since: 0.1 + */</input> + <parser> + <docblock> + <identifier> + <name>GtkdocObject:otest</name> + </identifier> + <tags> + <tag> + <name>since</name> + <value>0.1</value> + </tag> + </tags> + </docblock> + </parser> + <output> /** + * GtkdocObject:otest: + * + * Since: 0.1 + */</output> +</test> + +<test> + <input>/** + * GtkdocObject:dep-otest: + * + * Deprecated: use #GtkdocObject:otest property + */</input> + <parser> + <docblock> + <identifier> + <name>GtkdocObject:dep-otest</name> + </identifier> + <tags> + <tag> + <name>deprecated</name> + <description>use #GtkdocObject:otest property</description> + </tag> + </tags> + </docblock> + </parser> + <output> /** + * GtkdocObject:dep-otest: + * + * Deprecated: use #GtkdocObject:otest property + */</output> +</test> + +</tests> diff --git a/tests/scanner/annotationparser/gtkdoc/gobject/gobject.h.xml b/tests/scanner/annotationparser/gtkdoc/gobject/gobject.h.xml new file mode 100644 index 00000000..ec68a7f0 --- /dev/null +++ b/tests/scanner/annotationparser/gtkdoc/gobject/gobject.h.xml @@ -0,0 +1,213 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test"> + +<test> + <input>/** + * GtkdocObject: + * + * instance data of gtk-doc unit test class + */</input> + <parser> + <docblock> + <identifier> + <name>GtkdocObject</name> + </identifier> + <description>instance data of gtk-doc unit test class</description> + </docblock> + </parser> + <output>/** + * GtkdocObject: + * + * instance data of gtk-doc unit test class + */</output> +</test> + +<test> + <input>/** + * GtkdocObjectClass: + * @parent: this is a bug :/ + * @test: overideable method + * @ping: can be used before calling the @test() function + * @foo_bar: lets you refine your frobnicator + * + * class data of gtk-doc unit test class + */</input> + <parser> + <docblock> + <identifier> + <name>GtkdocObjectClass</name> + </identifier> + <parameters> + <parameter> + <name>parent</name> + <description>this is a bug :/</description> + </parameter> + <parameter> + <name>test</name> + <description>overideable method</description> + </parameter> + <parameter> + <name>ping</name> + <description>can be used before calling the @test() function</description> + </parameter> + <parameter> + <name>foo_bar</name> + <description>lets you refine your frobnicator</description> + </parameter> + </parameters> + <description>class data of gtk-doc unit test class</description> + </docblock> + </parser> + <output>/** + * GtkdocObjectClass: + * @parent: this is a bug :/ + * @test: overideable method + * @ping: can be used before calling the @test() function + * @foo_bar: lets you refine your frobnicator + * + * class data of gtk-doc unit test class + */</output> +</test> + +<test> + <input>/** + * GtkdocObject2: + * + * instance data of gtk-doc unit test class + */</input> + <parser> + <docblock> + <identifier> + <name>GtkdocObject2</name> + </identifier> + <description>instance data of gtk-doc unit test class</description> + </docblock> + </parser> + <output>/** + * GtkdocObject2: + * + * instance data of gtk-doc unit test class + */</output> +</test> + +<test> + <input>/** + * GtkdocObject2Class: + * @parent: this is a bug :/ + * + * class data of gtk-doc unit test class + */</input> + <parser> + <docblock> + <identifier> + <name>GtkdocObject2Class</name> + </identifier> + <parameters> + <parameter> + <name>parent</name> + <description>this is a bug :/</description> + </parameter> + </parameters> + <description>class data of gtk-doc unit test class</description> + </docblock> + </parser> + <output>/** + * GtkdocObject2Class: + * @parent: this is a bug :/ + * + * class data of gtk-doc unit test class + */</output> +</test> + +<test> + <input>/** + * GTKDOC_OBJECT_MACRO_DUMMY: + * @parameter_1: first arg + * @parameter_2: second arg + * + * This macro does nothing. + * + * Since: 0.1 + */</input> + <parser> + <docblock> + <identifier> + <name>GTKDOC_OBJECT_MACRO_DUMMY</name> + </identifier> + <parameters> + <parameter> + <name>parameter_1</name> + <description>first arg</description> + </parameter> + <parameter> + <name>parameter_2</name> + <description>second arg</description> + </parameter> + </parameters> + <description>This macro does nothing.</description> + <tags> + <tag> + <name>since</name> + <value>0.1</value> + </tag> + </tags> + </docblock> + </parser> + <output>/** + * GTKDOC_OBJECT_MACRO_DUMMY: + * @parameter_1: first arg + * @parameter_2: second arg + * + * This macro does nothing. + * + * Since: 0.1 + */</output> +</test> + +<test> + <input>/** + * GTKDOC_OBJECT_MACRO_SUM: + * @parameter_1: first arg + * @parameter_2: second arg + * + * This macro adds its args. + * + * Returns: the sum of @parameter_1 and @parameter_2 + */</input> + <parser> + <docblock> + <identifier> + <name>GTKDOC_OBJECT_MACRO_SUM</name> + </identifier> + <parameters> + <parameter> + <name>parameter_1</name> + <description>first arg</description> + </parameter> + <parameter> + <name>parameter_2</name> + <description>second arg</description> + </parameter> + </parameters> + <description>This macro adds its args.</description> + <tags> + <tag> + <name>returns</name> + <description>the sum of @parameter_1 and @parameter_2</description> + </tag> + </tags> + </docblock> + </parser> + <output>/** + * GTKDOC_OBJECT_MACRO_SUM: + * @parameter_1: first arg + * @parameter_2: second arg + * + * This macro adds its args. + * + * Returns: the sum of @parameter_1 and @parameter_2 + */</output> +</test> + +</tests> diff --git a/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.c.xml b/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.c.xml new file mode 100644 index 00000000..17d23562 --- /dev/null +++ b/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.c.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test"> + +<test> + <input>/** + * SECTION:types + * @title: GtkdocTypes + * @short_description: other gobject types for gtk-doc unit test + * @see_also: #GtkdocObject, #GtkdocIface + * + * This file contains non-sense code for the sole purpose of testing the docs. + */</input> + <parser> + <docblock> + <identifier> + <name>SECTION:types</name> + </identifier> + <parameters> + <parameter> + <name>title</name> + <description>GtkdocTypes</description> + </parameter> + <parameter> + <name>short_description</name> + <description>other gobject types for gtk-doc unit test</description> + </parameter> + <parameter> + <name>see_also</name> + <description>#GtkdocObject, #GtkdocIface</description> + </parameter> + </parameters> + <description>This file contains non-sense code for the sole purpose of testing the docs.</description> + </docblock> + </parser> + <output>/** + * SECTION:types + * @title: GtkdocTypes + * @short_description: other gobject types for gtk-doc unit test + * @see_also: #GtkdocObject, #GtkdocIface + * + * This file contains non-sense code for the sole purpose of testing the docs. + */</output> +</test> + +</tests> diff --git a/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml b/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml new file mode 100644 index 00000000..7331a556 --- /dev/null +++ b/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test"> + +<test> + <input>/** + * GtkdocEnum: + * @GTKDOC_ENUM_V1: first + * @GTKDOC_ENUM_V2: second + * Since: 0.10 + * + * Enum values for the #GtkdocEnum type. + */</input> + <parser> + <docblock> + <identifier> + <name>GtkdocEnum</name> + </identifier> + <parameters> + <parameter> + <name>GTKDOC_ENUM_V1</name> + <description>first</description> + </parameter> + <parameter> + <name>GTKDOC_ENUM_V2</name> + <description>second + Since: 0.10</description> + </parameter> + </parameters> + <description>Enum values for the #GtkdocEnum type.</description> + </docblock> + </parser> + <output>/** + * GtkdocEnum: + * @GTKDOC_ENUM_V1: first + * @GTKDOC_ENUM_V2: second + * Since: 0.10 + * + * Enum values for the #GtkdocEnum type. + */</output> +</test> + +<test> + <input>/** + * GtkdocPlainOldData: + * @n: Some integer member. + * @x: Some floating point member. + * + * Unboxed plain old data that should default to public members. + **/</input> + <parser> + <docblock> + <identifier> + <name>GtkdocPlainOldData</name> + </identifier> + <parameters> + <parameter> + <name>n</name> + <description>Some integer member.</description> + </parameter> + <parameter> + <name>x</name> + <description>Some floating point member.</description> + </parameter> + </parameters> + <description>Unboxed plain old data that should default to public members.</description> + </docblock> + </parser> + <output>/** + * GtkdocPlainOldData: + * @n: Some integer member. + * @x: Some floating point member. + * + * Unboxed plain old data that should default to public members. + */</output> +</test> + +<test> + <input>/** + * GtkdocBoxedPlainOldData: + * @n: Some integer member. + * @x: Some floating point member. + * + * Boxed plain old data that should default to public members. + **/</input> + <parser> + <docblock> + <identifier> + <name>GtkdocBoxedPlainOldData</name> + </identifier> + <parameters> + <parameter> + <name>n</name> + <description>Some integer member.</description> + </parameter> + <parameter> + <name>x</name> + <description>Some floating point member.</description> + </parameter> + </parameters> + <description>Boxed plain old data that should default to public members.</description> + </docblock> + </parser> + <output>/** + * GtkdocBoxedPlainOldData: + * @n: Some integer member. + * @x: Some floating point member. + * + * Boxed plain old data that should default to public members. + */</output> +</test> + +</tests> |