diff options
Diffstat (limited to 'tests/scanner/annotationparser/gtkdoc/gobject')
6 files changed, 283 insertions, 0 deletions
diff --git a/tests/scanner/annotationparser/gtkdoc/gobject/giface.c.xml b/tests/scanner/annotationparser/gtkdoc/gobject/giface.c.xml index dc9ae531..c295edbc 100644 --- a/tests/scanner/annotationparser/gtkdoc/gobject/giface.c.xml +++ b/tests/scanner/annotationparser/gtkdoc/gobject/giface.c.xml @@ -57,6 +57,26 @@ 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> @@ -90,6 +110,14 @@ or \# or even \@.]]></description> <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> @@ -126,6 +154,15 @@ or \# or even \@.]]></description> </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> @@ -149,6 +186,12 @@ or \# or even \@.]]></description> <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 index 58c22857..e3ed09ca 100644 --- a/tests/scanner/annotationparser/gtkdoc/gobject/giface.h.xml +++ b/tests/scanner/annotationparser/gtkdoc/gobject/giface.h.xml @@ -16,6 +16,11 @@ <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> @@ -32,6 +37,11 @@ <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> @@ -60,6 +70,13 @@ <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> @@ -88,6 +105,13 @@ <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> @@ -124,6 +148,15 @@ </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 index 111b5d67..6b8b34fd 100644 --- a/tests/scanner/annotationparser/gtkdoc/gobject/gobject.c.xml +++ b/tests/scanner/annotationparser/gtkdoc/gobject/gobject.c.xml @@ -100,6 +100,46 @@ This example serves two main purposes: 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> @@ -145,6 +185,20 @@ 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> @@ -180,6 +234,17 @@ All the internal details go here or not: </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> @@ -224,6 +289,17 @@ All the internal details go here or not: </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. + * + * Deprecated: Use g_object_set(obj,"otest",value,NULL); instead. + * Since: 0.5 + */]]></output> </test> <test> @@ -272,6 +348,21 @@ complex algorithm (http://en.wikipedia.org/wiki/Algorithm). </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> @@ -308,6 +399,15 @@ complex algorithm (http://en.wikipedia.org/wiki/Algorithm). </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> @@ -331,6 +431,12 @@ complex algorithm (http://en.wikipedia.org/wiki/Algorithm). <description>The event has been triggered.</description> </docblock> </parser> + <output> /** + * GtkdocObject::otest: + * @self: myself + * + * The event has been triggered. + */</output> </test> <test> @@ -362,6 +468,14 @@ complex algorithm (http://en.wikipedia.org/wiki/Algorithm). </tags> </docblock> </parser> + <output> /** + * GtkdocObject::dep-otest: + * @self: myself + * + * The event has been triggered. + * + * Deprecated: Use the #GtkdocObject::otest signal instead. + */</output> </test> <test> @@ -378,6 +492,11 @@ complex algorithm (http://en.wikipedia.org/wiki/Algorithm). <description>Something has happened.</description> </docblock> </parser> + <output> /** + * GtkdocObject::strings-changed: + * + * Something has happened. + */</output> </test> <test> @@ -394,6 +513,11 @@ complex algorithm (http://en.wikipedia.org/wiki/Algorithm). <description>Something has happened.</description> </docblock> </parser> + <output> /** + * GtkdocObject::variant-changed: + * + * Something has happened. + */</output> </test> <test> @@ -415,6 +539,11 @@ complex algorithm (http://en.wikipedia.org/wiki/Algorithm). </tags> </docblock> </parser> + <output> /** + * GtkdocObject:otest: + * + * Since: 0.1 + */</output> </test> <test> @@ -436,6 +565,11 @@ complex algorithm (http://en.wikipedia.org/wiki/Algorithm). </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 index 2fb9696d..ec68a7f0 100644 --- a/tests/scanner/annotationparser/gtkdoc/gobject/gobject.h.xml +++ b/tests/scanner/annotationparser/gtkdoc/gobject/gobject.h.xml @@ -16,6 +16,11 @@ <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> @@ -54,6 +59,15 @@ <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> @@ -70,6 +84,11 @@ <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> @@ -93,6 +112,12 @@ <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> @@ -129,6 +154,15 @@ </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> @@ -165,6 +199,15 @@ </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 index 78f11b27..17d23562 100644 --- a/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.c.xml +++ b/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.c.xml @@ -33,6 +33,14 @@ <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 index 644d5946..7331a556 100644 --- a/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml +++ b/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml @@ -30,6 +30,14 @@ <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> @@ -58,6 +66,13 @@ <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> @@ -86,6 +101,13 @@ <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> |