diff options
author | Dieter Verfaillie <dieterv@optionexplicit.be> | 2013-07-23 17:34:07 +0200 |
---|---|---|
committer | Dieter Verfaillie <dieterv@optionexplicit.be> | 2013-10-08 20:56:43 +0200 |
commit | 6a874b86a1b9aae0c50a30b8cd3033870797eb1c (patch) | |
tree | 03831e4e2c597381e1d6da2a8a7ea4d5fc4bf28a /tests/scanner/annotationparser | |
parent | 4b690b187bf8d0b7b571faaa050986b796e797a4 (diff) | |
download | gobject-introspection-6a874b86a1b9aae0c50a30b8cd3033870797eb1c.tar.gz |
giscanner: refactor GTK-Doc comment block serialization
Diffstat (limited to 'tests/scanner/annotationparser')
55 files changed, 2338 insertions, 92 deletions
diff --git a/tests/scanner/annotationparser/gi/annotation_allow_none.xml b/tests/scanner/annotationparser/gi/annotation_allow_none.xml index 7c9c3b38..ae6b3b37 100644 --- a/tests/scanner/annotationparser/gi/annotation_allow_none.xml +++ b/tests/scanner/annotationparser/gi/annotation_allow_none.xml @@ -49,6 +49,15 @@ </tags> </docblock> </parser> + <output>/** + * annotation_object_inout: + * @object: a #GObject + * @inoutarg: (inout) (allow-none): This is an argument test + * + * This is a test for out arguments + * + * Returns: (allow-none): an int + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_array.xml b/tests/scanner/annotationparser/gi/annotation_array.xml index bf00191c..3a7cbc0b 100644 --- a/tests/scanner/annotationparser/gi/annotation_array.xml +++ b/tests/scanner/annotationparser/gi/annotation_array.xml @@ -28,6 +28,12 @@ <description>Test taking a zero-terminated array</description> </docblock> </parser> + <output>/** + * annotation_object_compute_sum: + * @nums: (array): Sequence of numbers + * + * Test taking a zero-terminated array + */</output> </test> <test> @@ -78,6 +84,15 @@ <description>Test taking an array with length parameter</description> </docblock> </parser> + <output>/** + * 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 + */</output> </test> <test> @@ -128,6 +143,15 @@ are zero-terminated</description> <description>Test taking a zero-terminated array with length parameter</description> </docblock> </parser> + <output>/** + * 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 + */</output> </test> <test> @@ -184,6 +208,14 @@ are zero-terminated</description> <description>Test taking a zero-terminated array with length parameter</description> </docblock> </parser> + <output>/** + * 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 + */</output> </test> <test> @@ -228,6 +260,14 @@ are zero-terminated</description> <description>Test taking a guchar * with a length.</description> </docblock> </parser> + <output>/** + * 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. + */</output> </test> <test> @@ -286,6 +326,12 @@ are zero-terminated</description> </tags> </docblock> </parser> + <output>/** + * annotation_string_zero_terminated: + * @data: (array fixed-size=2): a third value + * + * Returns: (transfer full) (array zero-terminated=1): The return value + */</output> </test> <test> @@ -350,6 +396,12 @@ are zero-terminated</description> <message>3: Warning: Test: invalid "array" annotation option: "invalid"</message> </messages> </parser> + <output>/** + * annotation_string_zero_terminated: + * @data: (array invalid fixed-size=2): a third value + * + * Returns: (transfer full) (array zero-terminated=1): The return value + */</output> </test> <test> @@ -419,6 +471,13 @@ are zero-terminated</description> <message>6: Warning: Test: invalid "array" annotation option "zero-terminated" value "yes", must be an integer</message> </messages> </parser> + <output>/** + * g_app_launch_context_get_environment: + * @arg1: (array zero-terminated): ... + * @arg2: (array length): ... + * + * Returns: (array zero-terminated=yes): the child's environment + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_attributes.xml b/tests/scanner/annotationparser/gi/annotation_attributes.xml index 04372e47..e9d9b429 100644 --- a/tests/scanner/annotationparser/gi/annotation_attributes.xml +++ b/tests/scanner/annotationparser/gi/annotation_attributes.xml @@ -34,6 +34,11 @@ <description>This is an object used to test annotations.</description> </docblock> </parser> + <output>/** + * AnnotationObject: (attributes org.example.test1=horses org.example.test2 org.example.test3=cows) + * + * This is an object used to test annotations. + */</output> </test> <test> @@ -78,6 +83,11 @@ ^</message> </messages> </parser> + <output>/** + * AnnotationObject: (attributes org.example.test1=horses org.example.test2 org.example.test3=cows) + * + * This is an object used to test annotations. + */</output> </test> <test> @@ -153,6 +163,11 @@ Attributes: (org.example.test1 horses)) ^</message> </messages> </parser> + <output>/** + * AnnotationObject: (attributes org.example.test1=horses) + * + * This is an object used to test annotations. + */</output> </test> <test> @@ -194,6 +209,11 @@ Attributes: (org.example.test1 horses)) ^</message> </messages> </parser> + <output>/** + * AnnotationObject: (attributes org.example.Test=horses org.example.test2=cows) + * + * This is an object used to test annotations. + */</output> </test> <test> @@ -220,6 +240,11 @@ Attributes: (org.example.test1 horses)) ^</message> </messages> </parser> + <output>/** + * AnnotationObject: + * + * This is an object used to test annotations. + */</output> </test> <test> @@ -310,6 +335,17 @@ Attributes: (org.example.test1 horses)) </tags> </docblock> </parser> + <output>/** + * AnnotationObject::attribute-signal: + * @annotation: the annotation object + * @arg1: (attributes some.annotation.foo1=val1): a value + * @arg2: (attributes some.annotation.foo2=val2): another value + * @arg3: (array fixed-size=2): a third value + * + * This signal tests a signal with attributes. + * + * Returns: (attributes some.annotation.foo3=val3): the return value + */</output> </test> <test> @@ -424,6 +460,18 @@ Attributes: (org.example.test1 horses)) ^</message> </messages> </parser> + <output>/** + * AnnotationObject::attribute-signal: + * @annotation: the annotation object + * @arg1: (attributes some.annotation.foo1): a value + * @arg2: (attributes some.annotation.foo2=val2): another value + * @arg3: something special + * @arg4: (array fixed-size=2): a third value + * + * This signal tests a signal with attributes. + * + * Returns: (attributes some.annotation.foo3=val3): the return value + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_closure.xml b/tests/scanner/annotationparser/gi/annotation_closure.xml index c778e6aa..f67862c5 100644 --- a/tests/scanner/annotationparser/gi/annotation_closure.xml +++ b/tests/scanner/annotationparser/gi/annotation_closure.xml @@ -30,6 +30,13 @@ 'user_data' and hence has to be annotated.</description> </docblock> </parser> + <output>/** + * 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. + */</output> </test> <test> @@ -73,6 +80,13 @@ detection, and fixing it via annotations.</description> </docblock> </parser> + <output>/** + * 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. + */</output> </test> <test> @@ -121,6 +135,13 @@ detection, and fixing it via annotations.</description> ^</message> </messages> </parser> + <output>/** + * annotation_custom_destroy: + * @callback: (destroy destroy) (closure data=invalid): Destroy notification + * + * Test messing up the heuristic of closure/destroy-notification + * detection, and fixing it via annotations. + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_constructor.xml b/tests/scanner/annotationparser/gi/annotation_constructor.xml index 65ee93d5..8c0aeb28 100644 --- a/tests/scanner/annotationparser/gi/annotation_constructor.xml +++ b/tests/scanner/annotationparser/gi/annotation_constructor.xml @@ -18,6 +18,9 @@ </identifier> </docblock> </parser> + <output>/** + * regress_constructor: (constructor) + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_destroy.xml b/tests/scanner/annotationparser/gi/annotation_destroy.xml index bb81220b..e504a962 100644 --- a/tests/scanner/annotationparser/gi/annotation_destroy.xml +++ b/tests/scanner/annotationparser/gi/annotation_destroy.xml @@ -43,6 +43,13 @@ detection, and fixing it via annotations.</description> </docblock> </parser> + <output>/** + * 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. + */</output> </test> <test> @@ -91,6 +98,13 @@ detection, and fixing it via annotations.</description> ^</message> </messages> </parser> + <output>/** + * annotation_custom_destroy: + * @callback: (destroy destroy=invalid) (closure data): Destroy notification + * + * Test messing up the heuristic of closure/destroy-notification + * detection, and fixing it via annotations. + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_element_type.xml b/tests/scanner/annotationparser/gi/annotation_element_type.xml index 2e1f945e..65b3dd09 100644 --- a/tests/scanner/annotationparser/gi/annotation_element_type.xml +++ b/tests/scanner/annotationparser/gi/annotation_element_type.xml @@ -74,6 +74,13 @@ <message>4: Warning: Test: "element-type" annotation takes at most 2 options, 3 given</message> </messages> </parser> + <output>/** + * foo_test_array: + * @a: (element-type): + * @b: (element-type x y z): + * + * Returns: (element-type utf8) (transfer container): returns %NULL. + */</output> </test> <test> @@ -116,6 +123,14 @@ TpAccount::status-changed</description> </docblock> </parser> + <output>/** + * RegressTestObj::sig-with-hash-prop: + * @self: an object + * @hash: (element-type utf8 GObject.Value): + * + * This test signal is like TelepathyGlib's + * TpAccount::status-changed + */</output> </test> <test> @@ -162,6 +177,14 @@ element-type annotation.</description> </tags> </docblock> </parser> + <output>/** + * regress_test_ghash_nested_everything_return2: + * + * Another way of specifying nested parameterized types: using the + * element-type annotation. + * + * Returns: (element-type utf8 GLib.HashTable(utf8,utf8)) (transfer full): + */</output> </test> <test> @@ -198,6 +221,11 @@ element-type annotation.</description> ^</message> </messages> </parser> + <output> /** + * foo_test_array: + * + * Returns: (element-type invalid utf8=invalid GLib.HashTable(utf8,utf8)): returns %NULL. + */</output> </test> <test> @@ -234,6 +262,11 @@ element-type annotation.</description> ^</message> </messages> </parser> + <output> /** + * foo_test_array: + * + * Returns: (element-type utf8=invalid GLib.HashTable(utf8,utf8) invalid): returns %NULL. + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_foreign.xml b/tests/scanner/annotationparser/gi/annotation_foreign.xml index 2f90ac11..e65e9747 100644 --- a/tests/scanner/annotationparser/gi/annotation_foreign.xml +++ b/tests/scanner/annotationparser/gi/annotation_foreign.xml @@ -19,6 +19,9 @@ </identifier> </docblock> </parser> + <output>/** + * FooForeignStruct: (foreign) + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_get_value_func.xml b/tests/scanner/annotationparser/gi/annotation_get_value_func.xml index 7d1551f7..3e96f837 100644 --- a/tests/scanner/annotationparser/gi/annotation_get_value_func.xml +++ b/tests/scanner/annotationparser/gi/annotation_get_value_func.xml @@ -26,6 +26,11 @@ <description>This object tests regressions...</description> </docblock> </parser> + <output>/** + * RegressTestFundamentalObject: (get-value-func regress_test_value_get_fundamental_object) + * + * This object tests regressions... + */</output> </test> <test> @@ -62,6 +67,11 @@ ^</message> </messages> </parser> + <output>/** + * RegressTestFundamentalObject: (get-value-func regress_test_value_get_fundamental_object) + * + * This object tests regressions... + */</output> </test> <test> @@ -98,6 +108,11 @@ ^</message> </messages> </parser> + <output>/** + * RegressTestFundamentalObject: (get-value-func regress_test_value_get_fundamental_object) + * + * This object tests regressions... + */</output> </test> <test> @@ -129,6 +144,11 @@ ^</message> </messages> </parser> + <output>/** + * RegressTestFundamentalObject: (get-value-func regress_test_value_get_fundamental_object=invalid) + * + * This object tests regressions... + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_in.xml b/tests/scanner/annotationparser/gi/annotation_in.xml index 4e9be4fe..26daf5a6 100644 --- a/tests/scanner/annotationparser/gi/annotation_in.xml +++ b/tests/scanner/annotationparser/gi/annotation_in.xml @@ -49,6 +49,15 @@ </tags> </docblock> </parser> + <output>/** + * annotation_object_in: + * @object: a #GObject + * @inarg: (in) (transfer none): This is an argument test + * + * This is a test for in arguments + * + * Returns: an int + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_in_out.xml b/tests/scanner/annotationparser/gi/annotation_in_out.xml index 5530a6ab..1900229e 100644 --- a/tests/scanner/annotationparser/gi/annotation_in_out.xml +++ b/tests/scanner/annotationparser/gi/annotation_in_out.xml @@ -56,6 +56,16 @@ ^</message> </messages> </parser> + <output>/** + * annotation_object_inout: + * @object: a #GObject + * @inoutarg: (inout): This is an argument test + * @inoutarg2: (inout): This is an argument test + * + * This is a test for inout arguments + * + * Returns: an int + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_method.xml b/tests/scanner/annotationparser/gi/annotation_method.xml index 37c910c2..3b9f1b87 100644 --- a/tests/scanner/annotationparser/gi/annotation_method.xml +++ b/tests/scanner/annotationparser/gi/annotation_method.xml @@ -25,6 +25,10 @@ </parameters> </docblock> </parser> + <output>/** + * regress_forced_method: (method) + * @obj: A #RegressTestObj + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_out.xml b/tests/scanner/annotationparser/gi/annotation_out.xml index b5d08d5f..7bfc8638 100644 --- a/tests/scanner/annotationparser/gi/annotation_out.xml +++ b/tests/scanner/annotationparser/gi/annotation_out.xml @@ -41,6 +41,15 @@ </tags> </docblock> </parser> + <output>/** + * annotation_object_out: + * @object: a #GObject + * @outarg: (out): This is an argument test + * + * This is a test for out arguments + * + * Returns: an int + */</output> </test> <test> @@ -76,6 +85,11 @@ </parameters> </docblock> </parser> + <output>/** + * regress_test_struct_a_clone: + * @a: the structure + * @a_out: (out caller-allocates): the cloned structure + */</output> </test> <test> @@ -111,6 +125,11 @@ </parameters> </docblock> </parser> + <output>/** + * regress_test_struct_a_clone: + * @a: the structure + * @a_out: (out callee-allocates): the cloned structure + */</output> </test> <test> @@ -163,6 +182,11 @@ <message>4: Warning: Test: invalid "out" annotation option: "callee-allocates=invalid"</message> </messages> </parser> + <output>/** + * regress_test_struct_a_clone: + * @a: (out invalid): the structure + * @a_out: (out callee-allocates=invalid): the cloned structure + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_ref_func.xml b/tests/scanner/annotationparser/gi/annotation_ref_func.xml index c97683b2..a967102a 100644 --- a/tests/scanner/annotationparser/gi/annotation_ref_func.xml +++ b/tests/scanner/annotationparser/gi/annotation_ref_func.xml @@ -26,6 +26,11 @@ <description>This object tests regressions...</description> </docblock> </parser> + <output>/** + * RegressTestFundamentalObject: (ref-func regress_test_fundamental_object_ref) + * + * This object tests regressions... + */</output> </test> <test> @@ -62,6 +67,11 @@ ^</message> </messages> </parser> + <output>/** + * RegressTestFundamentalObject: (ref-func regress_test_fundamental_object_ref) + * + * This object tests regressions... + */</output> </test> <test> @@ -98,6 +108,11 @@ ^</message> </messages> </parser> + <output>/** + * RegressTestFundamentalObject: (ref-func regress_test_fundamental_object_ref) + * + * This object tests regressions... + */</output> </test> <test> @@ -129,6 +144,11 @@ ^</message> </messages> </parser> + <output>/** + * RegressTestFundamentalObject: (ref-func regress_test_fundamental_object_ref=invalid) + * + * This object tests regressions... + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_rename_to.xml b/tests/scanner/annotationparser/gi/annotation_rename_to.xml index 9fecdaf5..2987d889 100644 --- a/tests/scanner/annotationparser/gi/annotation_rename_to.xml +++ b/tests/scanner/annotationparser/gi/annotation_rename_to.xml @@ -48,6 +48,15 @@ <description>Test overriding via the "Rename To" annotation.</description> </docblock> </parser> + <output>/** + * annotation_object_watch_full: (rename-to annotation_object_watch) + * @object: A #AnnotationObject + * @func: The callback + * @user_data: The callback data + * @destroy: Destroy notification + * + * Test overriding via the "Rename To" annotation. + */</output> </test> <test> @@ -106,6 +115,15 @@ ^</message> </messages> </parser> + <output>/** + * annotation_object_watch_full: (rename-to annotation_object_watch) + * @object: A #AnnotationObject + * @func: The callback + * @user_data: The callback data + * @destroy: Destroy notification + * + * Test overriding via the "Rename To" annotation. + */</output> </test> <test> @@ -142,6 +160,11 @@ ^</message> </messages> </parser> + <output>/** + * annotation_object_watch_full: (rename-to annotation_object_watch) + * + * Test overriding via the "Rename To" annotation. + */</output> </test> <test> @@ -195,6 +218,15 @@ ^</message> </messages> </parser> + <output>/** + * annotation_object_watch_full: (rename-to annotation_object_watch=invalid) + * @object: A #AnnotationObject + * @func: The callback + * @user_data: The callback data + * @destroy: Destroy notification + * + * Test overriding via the "Rename To" annotation. + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_scope.xml b/tests/scanner/annotationparser/gi/annotation_scope.xml index 008591d6..3a22274a 100644 --- a/tests/scanner/annotationparser/gi/annotation_scope.xml +++ b/tests/scanner/annotationparser/gi/annotation_scope.xml @@ -43,6 +43,14 @@ <description>Test taking a call-scoped callback</description> </docblock> </parser> + <output>/** + * annotation_object_foreach: + * @object: a #AnnotationObject + * @func: (scope call): Callback to invoke + * @user_data: Callback user data + * + * Test taking a call-scoped callback + */</output> </test> <test> @@ -77,6 +85,13 @@ is invoked.</description> </docblock> </parser> + <output>/** + * regress_test_callback_destroy_notify: + * @callback: (scope notified): + * + * Notified - callback persists until a DestroyNotify delegate + * is invoked. + */</output> </test> <test> @@ -107,6 +122,10 @@ is invoked.</description> </parameters> </docblock> </parser> + <output>/** + * regress_test_callback_async: + * @callback: (scope async): + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_set_value_func.xml b/tests/scanner/annotationparser/gi/annotation_set_value_func.xml index 4619fb9f..f98944b5 100644 --- a/tests/scanner/annotationparser/gi/annotation_set_value_func.xml +++ b/tests/scanner/annotationparser/gi/annotation_set_value_func.xml @@ -26,6 +26,11 @@ <description>This object tests regressions...</description> </docblock> </parser> + <output>/** + * RegressTestFundamentalObject: (set-value-func regress_test_value_set_fundamental_object) + * + * This object tests regressions... + */</output> </test> <test> @@ -62,6 +67,11 @@ ^</message> </messages> </parser> + <output>/** + * RegressTestFundamentalObject: (set-value-func regress_test_value_set_fundamental_object) + * + * This object tests regressions... + */</output> </test> <test> @@ -98,6 +108,11 @@ ^</message> </messages> </parser> + <output>/** + * RegressTestFundamentalObject: (set-value-func regress_test_value_set_fundamental_object) + * + * This object tests regressions... + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_skip.xml b/tests/scanner/annotationparser/gi/annotation_skip.xml index ed8e75b5..e0352e03 100644 --- a/tests/scanner/annotationparser/gi/annotation_skip.xml +++ b/tests/scanner/annotationparser/gi/annotation_skip.xml @@ -40,6 +40,15 @@ annotation_object_watch_full().</description> </docblock> </parser> + <output>/** + * 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(). + */</output> </test> <test> @@ -71,6 +80,12 @@ annotation_object_watch_full().</description> <message>2: Warning: Test: "skip" annotation needs no options, 1 given</message> </messages> </parser> + <output>/** + * annotation_object_watch: (skip yes) + * + * This is here just for the sake of being overriden by its + * annotation_object_watch_full(). + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_transfer.xml b/tests/scanner/annotationparser/gi/annotation_transfer.xml index 3bbb8c49..9b4ded1a 100644 --- a/tests/scanner/annotationparser/gi/annotation_transfer.xml +++ b/tests/scanner/annotationparser/gi/annotation_transfer.xml @@ -56,6 +56,14 @@ known by GObject as it's only marked as G_TYPE_POINTER</description> </docblock> </parser> + <output>/** + * 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 + */</output> </test> <test> @@ -105,6 +113,15 @@ known by GObject as it's only marked as G_TYPE_POINTER</description> </tags> </docblock> </parser> + <output>/** + * annotation_object_in: + * @object: a #GObject + * @inarg: (in) (transfer none): This is an argument test + * + * This is a test for in arguments + * + * Returns: an int + */</output> </test> <test> @@ -136,6 +153,11 @@ known by GObject as it's only marked as G_TYPE_POINTER</description> </tags> </docblock> </parser> + <output>/** + * annotation_transfer_floating: + * + * Returns: (transfer floating): A floating object + */</output> </test> <test> @@ -164,6 +186,12 @@ known by GObject as it's only marked as G_TYPE_POINTER</description> without....</description> </docblock> </parser> + <output>/** + * FsSession:codecs-without-config: (transfer full) + * + * This is the same list of codecs as #FsSession:codecs + * without.... + */</output> </test> <test> @@ -202,6 +230,12 @@ without....</description> ^</message> </messages> </parser> + <output>/** + * FsSession:codecs-without-config: (transfer full) + * + * This is the same list of codecs as #FsSession:codecs + * without.... + */</output> </test> <test> @@ -240,6 +274,12 @@ without....</description> ^</message> </messages> </parser> + <output>/** + * FsSession:codecs-without-config: (transfer full) + * + * This is the same list of codecs as #FsSession:codecs + * without.... + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_type.xml b/tests/scanner/annotationparser/gi/annotation_type.xml index f2e35d4b..c3d6351d 100644 --- a/tests/scanner/annotationparser/gi/annotation_type.xml +++ b/tests/scanner/annotationparser/gi/annotation_type.xml @@ -56,6 +56,14 @@ known by GObject as it's only marked as G_TYPE_POINTER</description> </docblock> </parser> + <output>/** + * 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 + */</output> </test> <test> @@ -87,6 +95,9 @@ known by GObject as it's only marked as G_TYPE_POINTER</description> </identifier> </docblock> </parser> + <output>/** + * AnnotationObject:hash-table: (type GLib.HashTable(utf8,gint8)) (transfer container) + */</output> </test> <test> @@ -121,6 +132,9 @@ known by GObject as it's only marked as G_TYPE_POINTER</description> </identifier> </docblock> </parser> + <output>/** + * AnnotationObject:hash-table: (type GLib.HashTable(utf8,gint8)) (transfer container) + */</output> </test> <test> @@ -157,6 +171,11 @@ known by GObject as it's only marked as G_TYPE_POINTER</description> ^</message> </messages> </parser> + <output>/** + * RegressTestObj:hash-table: (type GLib.HashTable(utf8,gint8)) + * + * Test. + */</output> </test> <test> @@ -193,6 +212,11 @@ known by GObject as it's only marked as G_TYPE_POINTER</description> ^</message> </messages> </parser> + <output>/** + * RegressTestObj:hash-table: (type GLib.HashTable(utf8,gint8)) + * + * Test. + */</output> </test> <test> @@ -229,6 +253,11 @@ known by GObject as it's only marked as G_TYPE_POINTER</description> ^]]></message> </messages> </parser> + <output>/** + * RegressTestObj:hash-table: (type GLib.HashTable(utf8,gint8)) + * + * Test. + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_unref_func.xml b/tests/scanner/annotationparser/gi/annotation_unref_func.xml index a8a911c4..59f3f8d4 100644 --- a/tests/scanner/annotationparser/gi/annotation_unref_func.xml +++ b/tests/scanner/annotationparser/gi/annotation_unref_func.xml @@ -26,6 +26,11 @@ <description>This object tests regressions...</description> </docblock> </parser> + <output>/** + * RegressTestFundamentalObject: (unref-func regress_test_fundamental_object_unref) + * + * This object tests regressions... + */</output> </test> <test> @@ -62,6 +67,11 @@ ^</message> </messages> </parser> + <output>/** + * RegressTestFundamentalObject: (unref-func regress_test_fundamental_object_unref) + * + * This object tests regressions... + */</output> </test> <test> @@ -98,6 +108,11 @@ ^</message> </messages> </parser> + <output>/** + * RegressTestFundamentalObject: (unref-func regress_test_fundamental_object_unref) + * + * This object tests regressions... + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_value.xml b/tests/scanner/annotationparser/gi/annotation_value.xml index 06f2bf2c..7d72ef71 100644 --- a/tests/scanner/annotationparser/gi/annotation_value.xml +++ b/tests/scanner/annotationparser/gi/annotation_value.xml @@ -26,6 +26,11 @@ <description>Constant to define a calculated large value</description> </docblock> </parser> + <output>/** + * ANNOTATION_CALCULATED_LARGE: (value 10000000000UL) + * + * Constant to define a calculated large value + */</output> </test> <test> @@ -62,6 +67,11 @@ ^</message> </messages> </parser> + <output>/** + * ANNOTATION_CALCULATED_LARGE: (value 10000000000UL) + * + * Constant to define a calculated large value + */</output> </test> <test> @@ -98,6 +108,11 @@ ^</message> </messages> </parser> + <output>/** + * ANNOTATION_CALCULATED_LARGE: (value 10000000000UL) + * + * Constant to define a calculated large value + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotation_virtual.xml b/tests/scanner/annotationparser/gi/annotation_virtual.xml index 7439a699..3321eea0 100644 --- a/tests/scanner/annotationparser/gi/annotation_virtual.xml +++ b/tests/scanner/annotationparser/gi/annotation_virtual.xml @@ -43,6 +43,14 @@ <description>Read some stuff.</description> </docblock> </parser> + <output>/** + * foo_object_read: (virtual read_fn) + * @object: obj + * @offset: offset + * @length: length + * + * Read some stuff. + */</output> </test> <test> @@ -96,6 +104,14 @@ ^</message> </messages> </parser> + <output>/** + * foo_object_read: (virtual read_fn) + * @object: obj + * @offset: offset + * @length: length + * + * Read some stuff. + */</output> </test> <test> @@ -132,6 +148,11 @@ ^</message> </messages> </parser> + <output>/** + * foo_object_read: (virtual read_fn) + * + * Read some stuff. + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/annotations.xml b/tests/scanner/annotationparser/gi/annotations.xml index 0134abce..a7ca8e74 100644 --- a/tests/scanner/annotationparser/gi/annotations.xml +++ b/tests/scanner/annotationparser/gi/annotations.xml @@ -72,6 +72,12 @@ <message>3: Warning: Test: unknown annotation: invalid-annotation-option</message> </messages> </parser> + <output>/** + * annotation_test: (hello) (world) + * @param: (invalid-annotation-option): sizeof (x) == 1 + * + * Test unknown annotations without options. + */</output> </test> <test> @@ -126,6 +132,12 @@ <description>Oops.</description> </docblock> </parser> + <output>/** + * annotationtest: + * @object: some data (foo bar) + * + * Oops. + */</output> </test> <test> @@ -147,6 +159,11 @@ ^</message> </messages> </parser> + <output>/** + * annotation_test: + * + * Oops. + */</output> </test> <test> @@ -175,6 +192,11 @@ <message>2: Warning: Test: unknown annotation: world</message> </messages> </parser> + <output>/** + * annotation_test: (hello) (world) + * + * Test unknown annotations without options. + */</output> </test> <test> @@ -213,6 +235,11 @@ <message>2: Warning: Test: unknown annotation: world</message> </messages> </parser> + <output>/** + * annotation_test: (hello x=y z) (world something else) + * + * Test unknown annotations with options. + */</output> </test> <test> @@ -256,6 +283,12 @@ <description>Test multiple identical option names.</description> </docblock> </parser> + <output>/** + * annotation_test: + * @test: (element-type gint gint) (transfer none): + * + * Test multiple identical option names. + */</output> </test> <test> @@ -295,6 +328,11 @@ <description>Test nested parentheses.</description> </docblock> </parser> + <output>/** + * annotation_test: (type GLib.HashTable(utf8,gint8)) (attributes x=1 y=2) + * + * Test nested parentheses. + */</output> </test> <test> @@ -334,6 +372,11 @@ <description>Test nested parentheses.</description> </docblock> </parser> + <output>/** + * annotation_test: (type GLib.HashTable(utf8,GLib.HashTable(utf8,gint8))) (attributes x=1 y=2) + * + * Test nested parentheses. + */</output> </test> <test> @@ -373,6 +416,11 @@ <description>Test deprecated angled brackets.</description> </docblock> </parser> + <output>/** + * annotation_test: (type GLib.HashTable(utf8,GLib.HashTable(utf8,gint8))) (attributes x=1 y=2) + * + * Test deprecated angled brackets. + */</output> </test> <test> @@ -394,6 +442,11 @@ ^</message> </messages> </parser> + <output>/** + * annotation_test: + * + * Test too many '('. + */</output> </test> <test> @@ -430,6 +483,11 @@ ^</message> </messages> </parser> + <output>/** + * annotation_test: + * + * Closing should not follow an opening parentheses. + */</output> </test> <test> @@ -451,6 +509,11 @@ ^</message> </messages> </parser> + <output>/** + * annotation_test: + * + * Closing should not follow an opening parentheses. + */</output> </test> <test> @@ -472,6 +535,11 @@ ^</message> </messages> </parser> + <output>/** + * annotation_test: + * + * Test too many ')'. + */</output> </test> <test> @@ -499,6 +567,12 @@ ^]]></message> </messages> </parser> + <output>/** + * annotation_test: + * @test: + * + * Test missing '('. + */</output> </test> <test> @@ -520,6 +594,11 @@ ^</message> </messages> </parser> + <output>/** + * annotation_test: + * + * Test missing ')'. + */</output> </test> <test> @@ -547,6 +626,12 @@ ^]]></message> </messages> </parser> + <output>/** + * annotation_test: + * @test: + * + * Test missing ')'. + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/identifier.xml b/tests/scanner/annotationparser/gi/identifier.xml index dd8ee17e..eb090307 100644 --- a/tests/scanner/annotationparser/gi/identifier.xml +++ b/tests/scanner/annotationparser/gi/identifier.xml @@ -25,6 +25,11 @@ ^</message> </messages> </parser> + <output>/** + * SECTION:test_invalid_section_identifier + * + * Above identifier is not on the first line. + */</output> </test> <test> @@ -49,6 +54,9 @@ ^</message> </messages> </parser> + <output>/** + * SECTION:meepapp + */</output> </test> <test> @@ -77,6 +85,13 @@ The application class handles ...</description> </docblock> </parser> + <output>/** + * SECTION:meepapp + * @short_description: the application class + * + * SECTION:meepapp2 + * The application class handles ... + */</output> </test> <test> diff --git a/tests/scanner/annotationparser/gi/identifier_section.xml b/tests/scanner/annotationparser/gi/identifier_section.xml index b75e2dd2..fad2b2ed 100644 --- a/tests/scanner/annotationparser/gi/identifier_section.xml +++ b/tests/scanner/annotationparser/gi/identifier_section.xml @@ -55,6 +55,18 @@ <description>The application class handles ...</description> </docblock> </parser> + <output>/** + * 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 ... + */</output> </test> <test> @@ -116,6 +128,18 @@ ^</message> </messages> </parser> + <output>/** + * 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 ... + */</output> </test> <test> @@ -176,6 +200,18 @@ ^</message> </messages> </parser> + <output>/** + * 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 ... + */</output> </test> <test> @@ -237,6 +273,18 @@ ^</message> </messages> </parser> + <output>/** + * 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 ... + */</output> </test> <test> @@ -270,6 +318,15 @@ As described in http://bugzilla.gnome.org/show_bug.cgi?id=457077 it returns nothing.</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. + * + * As described in http://bugzilla.gnome.org/show_bug.cgi?id=457077 it + * returns nothing. + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/identifier_symbol.xml b/tests/scanner/annotationparser/gi/identifier_symbol.xml index 2f27975d..522f1fa8 100644 --- a/tests/scanner/annotationparser/gi/identifier_symbol.xml +++ b/tests/scanner/annotationparser/gi/identifier_symbol.xml @@ -16,6 +16,11 @@ <description>test_symbol does something nifty.</description> </docblock> </parser> + <output>/** + * test_symbol: + * + * test_symbol does something nifty. + */</output> </test> <test> @@ -32,6 +37,11 @@ <description>Unnecessary colon.</description> </docblock> </parser> + <output>/** + * test_symbol_unnecessary_colon: + * + * Unnecessary colon. + */</output> </test> <test> @@ -53,6 +63,11 @@ <description>test_annotated_symbol does something nifty.</description> </docblock> </parser> + <output>/** + * test_annotated_symbol: (skip) + * + * test_annotated_symbol does something nifty. + */</output> </test> <test> @@ -79,6 +94,11 @@ ^</message> </messages> </parser> + <output>/** + * test_symbol_missing_colon: (skip) + * + * Missing colon will result in a warning. + */</output> </test> <test> @@ -100,6 +120,11 @@ <description>Malformed symbol identifier.</description> </docblock> </parser> + <output>/** + * test_malformed_symbol: (skip) + * + * Malformed symbol identifier. + */</output> </test> <test> @@ -116,6 +141,11 @@ <description>Some property.</description> </docblock> </parser> + <output>/** + * GtkWidget:test_property: + * + * Some property. + */</output> </test> <test> @@ -132,6 +162,11 @@ <description>Unnecessary colon.</description> </docblock> </parser> + <output>/** + * GtkWidget:test_property_unnecessary_colon: + * + * Unnecessary colon. + */</output> </test> <test> @@ -153,6 +188,11 @@ <description>Some annotated property.</description> </docblock> </parser> + <output>/** + * GtkWidget:test_annotated_property: (skip) + * + * Some annotated property. + */</output> </test> <test> @@ -179,6 +219,11 @@ ^</message> </messages> </parser> + <output>/** + * GtkWidget:test_property_missing_colon: (skip) + * + * Missing colon will result in a warning. + */</output> </test> <test> @@ -200,6 +245,11 @@ <description>Malformed property identifier.</description> </docblock> </parser> + <output>/** + * GtkWidget:test_malformed_property: (skip) + * + * Malformed property identifier. + */</output> </test> <test> @@ -216,6 +266,11 @@ <description>Some signal.</description> </docblock> </parser> + <output>/** + * GtkWidget::test_signal: + * + * Some signal. + */</output> </test> <test> @@ -232,6 +287,11 @@ <description>Unnecessary colon.</description> </docblock> </parser> + <output>/** + * GtkWidget::test_signal_unnecessary_colon: + * + * Unnecessary colon. + */</output> </test> <test> @@ -253,6 +313,11 @@ <description>Some annotated signal.</description> </docblock> </parser> + <output>/** + * GtkWidget::test_annotated_signal: (skip) + * + * Some annotated signal. + */</output> </test> <test> @@ -279,6 +344,11 @@ ^</message> </messages> </parser> + <output>/** + * GtkWidget::test_signal_missing_colon: (skip) + * + * Missing colon will result in a warning. + */</output> </test> <test> @@ -300,6 +370,11 @@ <description>Malformed signal identifier.</description> </docblock> </parser> + <output>/** + * GtkWidget::test_malformed_signal: (skip) + * + * Malformed signal identifier. + */</output> </test> <test> @@ -348,6 +423,13 @@ Annotations spanning multiple lines are not valid</description> ^</message> </messages> </parser> + <output>/** + * test_multiline_annotations_on_identifier: (skip) + * @param1: (allow-none) (transfer full): first parameter + * + * (foreign) + * Annotations spanning multiple lines are not valid + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/parameter.xml b/tests/scanner/annotationparser/gi/parameter.xml index fcf9ee42..43f97b3f 100644 --- a/tests/scanner/annotationparser/gi/parameter.xml +++ b/tests/scanner/annotationparser/gi/parameter.xml @@ -33,6 +33,12 @@ ^</message> </messages> </parser> + <output>/** + * test_parameter_missing_colon: + * @param1: (allow-none): first parameter + * + * Forgotten colon above will result in a warning. + */</output> </test> <test> @@ -72,6 +78,14 @@ ^</message> </messages> </parser> + <output>/** + * test_unexpected_parameter: + * @param1: first parameter + * + * Parameters should go before the comment block description. + * + * Returns: something + */</output> </test> <test> @@ -98,6 +112,10 @@ ^</message> </messages> </parser> + <output>/** + * test_multiple_parameters: + * @param1: first parameter again + */</output> </test> <test> @@ -133,6 +151,13 @@ ^</message> </messages> </parser> + <output>/** + * test_multiline_annotations_on_parameter: + * @param1: (allow-none): + * (transfer full): first parameter + * + * Annotations spanning multiple lines are not valid + */</output> </test> <test> @@ -163,6 +188,13 @@ <description>Annotations spanning multiple lines are not valid</description> </docblock> </parser> + <output>/** + * test_multiline_annotations_on_parameter: + * @param1: (allow-none): first parameter having a second line which looks + * (like an annotation), but isn't. This should not result in a warning. + * + * Annotations spanning multiple lines are not valid + */</output> </test> <test> @@ -199,6 +231,14 @@ ^</message> </messages> </parser> + <output>/** + * anjuta_async_notify_get_error: + * @self: An #AnjutaAsyncNotify object + * @error: Return location for the error set by the called interface to which + * this object was passed. If no error is set, @error is set to NULL. + * + * Gets the error set on @self. + */</output> </test> <test> @@ -253,6 +293,24 @@ after #GtkPrintOperation::done was emitted.</description> </tags> </docblock> </parser> + <output> /** + * GtkPrintOperation::done: + * @operation: the #GtkPrintOperation on which the signal was emitted + * @result: the result of the print operation + * + * Emitted when the print operation run has finished doing + * everything required for printing. + * + * @result gives you information about what happened during the run. + * If @result is %GTK_PRINT_OPERATION_RESULT_ERROR then you can call + * gtk_print_operation_get_error() for more information. + * + * If you enabled print status tracking then + * gtk_print_operation_is_finished() may still return %FALSE + * after #GtkPrintOperation::done was emitted. + * + * Since: 2.10 + */</output> </test> <test> diff --git a/tests/scanner/annotationparser/gi/parameter_varargs.xml b/tests/scanner/annotationparser/gi/parameter_varargs.xml index 0952ee92..b22906de 100644 --- a/tests/scanner/annotationparser/gi/parameter_varargs.xml +++ b/tests/scanner/annotationparser/gi/parameter_varargs.xml @@ -61,6 +61,22 @@ other declarations (which may be documented elsewhere).</description> </tags> </docblock> </parser> + <output>/** + * function_name: + * @par1: description of parameter 1. These can extend over more than + * one line. + * @par2: description of parameter 2 + * @...: a %NULL-terminated list of bars + * + * The function description goes here. You can use @par1 to refer to parameters + * so that they are highlighted in the output. You can also use %constant + * for constants, function_name2() for functions and #GtkWidget for links to + * other declarations (which may be documented elsewhere). + * + * Returns: an integer. + * Since: 2.2 + * Deprecated: 2.18: Use other_function() instead. + */</output> </test> <test> @@ -104,6 +120,14 @@ name it is called in.</description> ^</message> </messages> </parser> + <output>/** + * DBG: + * @fmt: format string + * @...: list of arguments + * + * Simple macro around btd_debug() which also include the function + * name it is called in. + */</output> </test> <test> @@ -173,6 +197,22 @@ other declarations (which may be documented elsewhere).</description> ^</message> </messages> </parser> + <output>/** + * function_name: + * @par1: description of parameter 1. These can extend over more than + * one line. + * @par2: description of parameter 2 + * @...: a %NULL-terminated list of bars + * + * The function description goes here. You can use @par1 to refer to parameters + * so that they are highlighted in the output. You can also use %constant + * for constants, function_name2() for functions and #GtkWidget for links to + * other declarations (which may be documented elsewhere). + * + * Returns: an integer. + * Since: 2.2 + * Deprecated: 2.18: Use other_function() instead. + */</output> </test> <test> @@ -237,6 +277,22 @@ other declarations (which may be documented elsewhere).</description> </tags> </docblock> </parser> + <output>/** + * function_name: + * @par1: description of parameter 1. These can extend over more than + * one line. + * @par2: description of parameter 2 + * @varargs: a %NULL-terminated list of bars + * + * The function description goes here. You can use @par1 to refer to parameters + * so that they are highlighted in the output. You can also use %constant + * for constants, function_name2() for functions and #GtkWidget for links to + * other declarations (which may be documented elsewhere). + * + * Returns: an integer. + * Since: 2.2 + * Deprecated: 2.18: Use other_function() instead. + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/syntax.xml b/tests/scanner/annotationparser/gi/syntax.xml index 2ea2c6f8..b4eff5ac 100644 --- a/tests/scanner/annotationparser/gi/syntax.xml +++ b/tests/scanner/annotationparser/gi/syntax.xml @@ -89,6 +89,9 @@ something */</input> ^</message> </messages> </parser> + <output>/** + * Test: + */</output> </test> <test> @@ -106,6 +109,9 @@ Test */ ^</message> </messages> </parser> + <output>/** + * Test: + */</output> </test> <test> @@ -127,6 +133,11 @@ something */ ^</message> </messages> </parser> + <output>/** + * Test: + * + * something + */</output> </test> <test> @@ -146,6 +157,11 @@ something */ ^</message> </messages> </parser> + <output>/** + * Test: + * + * something + */</output> </test> <test> @@ -165,6 +181,11 @@ something **/ ^</message> </messages> </parser> + <output>/** + * Test: + * + * something + */</output> </test> <test> @@ -192,6 +213,13 @@ something */ code goes here ^</message> </messages> </parser> + <output><![CDATA[code goes here +/** + * Test: + * + * something + */ + code goes here]]></output> </test> <test> @@ -225,6 +253,12 @@ something */ code goes here ^</message> </messages> </parser> + <output>/** + * SECTION:meepapp + * @short_description: the application class + * + * The application class handles ... + */</output> </test> <test> @@ -261,6 +295,13 @@ https://bugzilla.gnome.org/show_bug.cgi?id=673806</description> ^</message> </messages> </parser> + <output>/** + * regress_test_invalid_comment: + * @foo: a param + * + * comment having lines without ' * ' + * https://bugzilla.gnome.org/show_bug.cgi?id=673806 + */</output> </test> <test> @@ -301,6 +342,18 @@ a *</description> </tags> </docblock> </parser> + <output>/** + * atk_hyperlink_is_inline: + * @link_: an #AtkHyperlink + * + * Indicates whether the link currently displays some or all of its + * content inline. Ordinary HTML links will usually return + * %FALSE, but an inline <src> HTML element will return + * %TRUE. + * a * + * + * Returns: whether or not this link displays its content inline. + */</output> </test> <test> @@ -336,6 +389,18 @@ and gtk_tooltip_set_icon().</description> </tags> </docblock> </parser> + <output>/** + * gtk_tooltip_set_custom: + * + * Replaces the widget packed into the tooltip with + * @custom_widget. @custom_widget does not get destroyed when the tooltip goes + * away. + * By default a box with a #GtkImage and #GtkLabel is embedded in + * the tooltip, which can be configured using gtk_tooltip_set_markup() + * and gtk_tooltip_set_icon(). + * + * Since: 2.12 + */</output> </test> <test> @@ -363,6 +428,12 @@ and gtk_tooltip_set_icon().</description> </tags> </docblock> </parser> + <output>/** + * clutter_text_coords_to_position: + * @self: a #ClutterText + * + * Returns: the position of the character + */</output> </test> <test> @@ -383,6 +454,11 @@ and gtk_tooltip_set_icon().</description> </tags> </docblock> </parser> + <output>/** + * clutter_text_coords_to_position: + * + * Returns: the position of the character + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/syntax_indentation.xml b/tests/scanner/annotationparser/gi/syntax_indentation.xml index 21fd1d84..1b8c6324 100644 --- a/tests/scanner/annotationparser/gi/syntax_indentation.xml +++ b/tests/scanner/annotationparser/gi/syntax_indentation.xml @@ -16,6 +16,11 @@ <description>Describe section here</description> </docblock> </parser> + <output> /** + * SECTION:test + * + * Describe section here + */</output> </test> <test> @@ -32,6 +37,11 @@ <description>Describe section here</description> </docblock> </parser> + <output> /** + * SECTION:test + * + * Describe section here + */</output> </test> <test> @@ -48,6 +58,11 @@ <description>Describe section here</description> </docblock> </parser> + <output> /** + * SECTION:test + * + * Describe section here + */</output> </test> <test> @@ -64,6 +79,11 @@ <description>Describe section here</description> </docblock> </parser> + <output indent="false">/** + * SECTION:test + * + * Describe section here + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/syntax_multiline_annotations.xml b/tests/scanner/annotationparser/gi/syntax_multiline_annotations.xml index 0f5efa13..4aa92e42 100644 --- a/tests/scanner/annotationparser/gi/syntax_multiline_annotations.xml +++ b/tests/scanner/annotationparser/gi/syntax_multiline_annotations.xml @@ -32,6 +32,12 @@ ^</message> </messages> </parser> + <output>/** + * regress_forced_method: (skip) + * @obj: A #RegressTestObj + * + * (method) + */</output> </test> <test> @@ -64,6 +70,12 @@ ^</message> </messages> </parser> + <output>/** + * regress_forced_method: (skip) + * @obj: A #RegressTestObj + * + * (method) + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/syntax_nested_tags.xml b/tests/scanner/annotationparser/gi/syntax_nested_tags.xml index d5a30423..d1dd54f8 100644 --- a/tests/scanner/annotationparser/gi/syntax_nested_tags.xml +++ b/tests/scanner/annotationparser/gi/syntax_nested_tags.xml @@ -45,6 +45,19 @@ </tags> </docblock> </parser> + <output>/** + * 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 + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml b/tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml index 7e88bf73..77cabf0e 100644 --- a/tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml +++ b/tests/scanner/annotationparser/gi/syntax_paragraph_breaks.xml @@ -24,6 +24,13 @@ So this is considered a new paragraph.</description> </docblock> </parser> + <output>/** + * SECTION:test + * + * The following line is ' *' (blank-asterisk). + * + * So this is considered a new paragraph. + */</output> </test> <test> @@ -53,6 +60,13 @@ So this is considered a new paragraph.</description> ^</message> </messages> </parser> + <output>/** + * SECTION:test + * + * The following line is ' *' (blank-asterisk). + * + * So this is considered a new paragraph. + */</output> </test> <test> @@ -76,6 +90,13 @@ So this is considered a new paragraph.</description> So this is considered a new paragraph.</description> </docblock> </parser> + <output>/** + * SECTION:test + * + * The following line is ' * ' (blank-asterisk-blank). + * + * So this is considered a new paragraph. + */</output> </test> <test> @@ -104,6 +125,13 @@ So this is considered a new paragraph.</description> ^</message> </messages> </parser> + <output>/** + * SECTION:test + * + * The following line is ' * ' (blank-asterisk-blank). + * + * So this is considered a new paragraph. + */</output> </test> <test> @@ -129,6 +157,13 @@ So this is considered a new paragraph.</description> So this is preceded by an empty line and is not considered a new paragraph.</description> </docblock> </parser> + <output>/** + * 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. + */</output> </test> <test> @@ -159,6 +194,13 @@ So this is preceded by an empty line and is not considered a new paragraph.</des ^</message> </messages> </parser> + <output>/** + * 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. + */</output> </test> <test> @@ -212,6 +254,27 @@ print_attributes (GIBaseInfo *info) </example>]]></description> </docblock> </parser> + <output><![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> + */]]></output> </test> <test> @@ -270,6 +333,27 @@ print_attributes (GIBaseInfo *info) ^]]></message> </messages> </parser> + <output><![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> + */]]></output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/syntax_whitespace.xml b/tests/scanner/annotationparser/gi/syntax_whitespace.xml index e66836c2..c7934dac 100644 --- a/tests/scanner/annotationparser/gi/syntax_whitespace.xml +++ b/tests/scanner/annotationparser/gi/syntax_whitespace.xml @@ -57,6 +57,19 @@ Test overriding via the "Rename To" annotation.</description> ^</message> </messages> </parser> + <output>/** + * whitespace_test: + * @object: (skip): + * @func: The callback + * + * A #AnnotationObject + * + * + * + * Test overriding via the "Rename To" annotation. + * + * Returns: nothing + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/tag.xml b/tests/scanner/annotationparser/gi/tag.xml index c91ec0f0..8480d4b4 100644 --- a/tests/scanner/annotationparser/gi/tag.xml +++ b/tests/scanner/annotationparser/gi/tag.xml @@ -34,6 +34,13 @@ ^</message> </messages> </parser> + <output>/** + * test_tag_missing_colon: + * + * Forgotten colon below will result in a warning. + * + * Returns: (allow-none): return value + */</output> </test> <test> @@ -77,6 +84,17 @@ the "Returns:"" tag description field.</description> ^</message> </messages> </parser> + <output>/** + * test_unexpected_tag: + * @param1: first parameter + * does something + * + * Returns: something + * returning something + * + * Probably intended as the comment block description part but in reality belongs to + * the "Returns:"" tag description field. + */</output> </test> <test> @@ -181,6 +199,14 @@ Moo: anything</description> ^</message> </messages> </parser> + <output>/** + * test_multiline_annotations_on_tag: + * + * Annotations spanning multiple lines are not valid + * + * Returns: (allow-none): + * (transfer full): something + */</output> </test> <test> @@ -212,6 +238,14 @@ Moo: anything</description> </tags> </docblock> </parser> + <output>/** + * test_multiline_annotations_on_tag: + * + * Annotations spanning multiple lines are not valid + * + * Returns: (allow-none): Returns tag having a second line which looks + * (like an annotation), but isn't. This should not result in a warning. + */</output> </test> <test> @@ -273,6 +307,18 @@ the axes that @device currently has.</description> </tags> </docblock> </parser> + <output>/** + * gdk_device_list_axes: + * @device: a pointer #GdkDevice + * + * Returns a #GList of #GdkAtom<!-- -->s, containing the labels for + * the axes that @device currently has. + * + * Returns: (transfer container) (element-type GdkAtom): + * A #GList of #GdkAtom<!-- -->s, free + * with g_list_free(). + * Since: 3.0 + */</output> </test> <test> @@ -336,6 +382,20 @@ dynamically assigned payload type.</description> ^</message> </messages> </parser> + <output> /** + * FsSession:codec-preferences: (type GLib.List(FsCodec)) (transfer full) + * + * This is the current preferences list for the local codecs. It is + * set by the user to specify the codec options and priorities. The user may + * change its value with fs_session_set_codec_preferences() at any time + * during a session. It is a #GList of #FsCodec. + * The user must free this codec list using fs_codec_list_destroy() when done. + * + * The payload type may be a valid dynamic PT (96-127), %FS_CODEC_ID_DISABLE + * or %FS_CODEC_ID_ANY. If the encoding name is "reserve-pt", then the + * payload type of the codec will be "reserved" and not be used by any + * dynamically assigned payload type. + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/tag_deprecated.xml b/tests/scanner/annotationparser/gi/tag_deprecated.xml index dcbb2195..f1e8ca60 100644 --- a/tests/scanner/annotationparser/gi/tag_deprecated.xml +++ b/tests/scanner/annotationparser/gi/tag_deprecated.xml @@ -22,6 +22,11 @@ </tags> </docblock> </parser> + <output>/** + * annotation_versioned: + * + * Deprecated: 0.6: Use something else instead + */</output> </test> <test> @@ -43,6 +48,11 @@ </tags> </docblock> </parser> + <output>/** + * annotation_versioned: + * + * Deprecated: 0.6 + */</output> </test> <test> @@ -70,6 +80,13 @@ <message>6: Error: Test: annotations not supported for tag "Deprecated:".</message> </messages> </parser> + <output>/** + * test_tag_not_annotatable: + * + * Tags (except Returns:) don't have annotations + * + * Deprecated: 2.24 + */</output> </test> <test> @@ -100,6 +117,11 @@ ^</message> </messages> </parser> + <output>/** + * test_multiple_tags: + * + * Deprecated: 2.0 + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/tag_description.xml b/tests/scanner/annotationparser/gi/tag_description.xml index 99245c8c..3dff7f33 100644 --- a/tests/scanner/annotationparser/gi/tag_description.xml +++ b/tests/scanner/annotationparser/gi/tag_description.xml @@ -23,6 +23,12 @@ ^</message> </messages> </parser> + <output>/** + * shiny_function: + * + * This is a callback with a 'closure' argument that is not named + * 'user_data' and hence has to be annotated. + */</output> </test> <test> @@ -45,6 +51,12 @@ ^</message> </messages> </parser> + <output>/** + * shiny_function: + * + * This is a callback with a 'closure' argument that is not named + * 'user_data' and hence has to be annotated. + */</output> </test> <test> @@ -72,6 +84,14 @@ This is a callback with a 'closure' argument that is not named ^</message> </messages> </parser> + <output>/** + * shiny_function: + * + * Some description here, but also below... + * + * This is a callback with a 'closure' argument that is not named + * 'user_data' and hence has to be annotated. + */</output> </test> <test> @@ -99,6 +119,14 @@ This is a callback with a 'closure' argument that is not named ^</message> </messages> </parser> + <output>/** + * shiny_function: + * + * This is a callback with a 'closure' argument that is not named + * 'user_data' and hence has to be annotated. + * + * etc... + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/tag_returns.xml b/tests/scanner/annotationparser/gi/tag_returns.xml index 8396320b..8ccfaa63 100644 --- a/tests/scanner/annotationparser/gi/tag_returns.xml +++ b/tests/scanner/annotationparser/gi/tag_returns.xml @@ -29,6 +29,13 @@ </tags> </docblock> </parser> + <output>/** + * annotation_object_string_out: + * + * Test returning a string as an out parameter + * + * Returns: (allow-none): some boolean + */</output> </test> <test> @@ -95,6 +102,14 @@ Tags should go after the comment block description</description> </tags> </docblock> </parser> + <output>/** + * test_unexpected_tag: + * @param1: first parameter + * + * Returns: something + * + * Tags should go after the comment block description + */</output> </test> <test> @@ -127,6 +142,13 @@ Tags should go after the comment block description</description> </tags> </docblock> </parser> + <output>/** + * annotation_object_string_out: + * + * Test returning a string as an out parameter + * + * Returns: (allow-none): some boolean + */</output> </test> <test> @@ -158,6 +180,13 @@ Tags should go after the comment block description</description> </tags> </docblock> </parser> + <output>/** + * annotation_object_string_out: + * + * Test returning a string as an out parameter + * + * Returns: (allow-none): some boolean + */</output> </test> <test> @@ -263,6 +292,14 @@ parameter is encountered.</description> <message>8: Error: Test: encountered multiple "Returns" parameters or tags for "test_multiple_returns_tag_and_parameter".</message> </messages> </parser> + <output>/** + * test_multiple_returns_tag_and_parameter: + * + * Multiple return value warnings are checked for when a returns + * parameter is encountered. + * + * Returns: something else + */</output> </test> <test> @@ -296,6 +333,14 @@ parameter is encountered.</description> <message>8: Error: Test: encountered multiple return value parameters or tags for "test_multiple_returns_tag_and_parameter".</message> </messages> </parser> + <output>/** + * test_multiple_returns_tag_and_parameter: + * + * Multiple return value warnings are checked for when a returns + * parameter is encountered. + * + * Returns: something else + */</output> </test> <test> @@ -329,6 +374,14 @@ parameter is encountered.</description> <message>8: Error: Test: encountered multiple return value parameters or tags for "test_multiple_returns_tag_and_parameter".</message> </messages> </parser> + <output>/** + * test_multiple_returns_tag_and_parameter: + * + * Multiple return value warnings are checked for when a returns + * parameter is encountered. + * + * Returns: something else + */</output> </test> <test> @@ -362,6 +415,18 @@ not be used by applications under normal circumstances.]]></description> </tags> </docblock> </parser> + <output><![CDATA[/** + * gtk_rc_get_im_module_path: + * + * Obtains the path in which to look for IM modules. See the documentation + * of the <link linkend="im-module-path"><envar>GTK_PATH</envar></link> + * environment variable for more details about looking up modules. This + * function is useful solely for utilities supplied with GTK+ and should + * not be used by applications under normal circumstances. + * + * Returns: a newly-allocated string containing the path in which to + * look for IM modules. + */]]></output> </test> <test> @@ -413,6 +478,17 @@ not be used by applications under normal circumstances.]]></description> </tags> </docblock> </parser> + <output>/** + * clutter_text_coords_to_position: + * @self: a #ClutterText + * @x: the X coordinate, relative to the actor + * @y: the Y coordinate, relative to the actor + * + * Retrieves the position of the character at the given coordinates. + * + * Returns: the position of the character + * Since: 1.10 + */</output> </test> <test> @@ -464,6 +540,17 @@ not be used by applications under normal circumstances.]]></description> </tags> </docblock> </parser> + <output>/** + * clutter_text_coords_to_position: + * @self: a #ClutterText + * @x: the X coordinate, relative to the actor + * @y: the Y coordinate, relative to the actor + * + * Retrieves the position of the character at the given coordinates. + * + * Returns: the position of the character + * Since: 1.10 + */</output> </test> <test> @@ -496,6 +583,13 @@ not be used by applications under normal circumstances.]]></description> <message>6: Warning: Test: unexpected annotation: out</message> </messages> </parser> + <output>/** + * annotation_object_string_out: + * + * Test returning a string as an out parameter + * + * Returns: (out): some boolean + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/tag_since.xml b/tests/scanner/annotationparser/gi/tag_since.xml index e8545452..06116aa1 100644 --- a/tests/scanner/annotationparser/gi/tag_since.xml +++ b/tests/scanner/annotationparser/gi/tag_since.xml @@ -21,6 +21,11 @@ </tags> </docblock> </parser> + <output>/** + * annotation_versioned: + * + * Since: 0.6 + */</output> </test> <test> @@ -72,6 +77,11 @@ </tags> </docblock> </parser> + <output>/** + * annotation_versioned: + * + * Since: this function is available since version 0.6 + */</output> </test> <test> @@ -94,6 +104,11 @@ </tags> </docblock> </parser> + <output>/** + * annotation_versioned: + * + * Since: 0.6: this function is available since version 0.6 + */</output> </test> <test> @@ -121,6 +136,13 @@ <message>6: Error: Test: annotations not supported for tag "Since:".</message> </messages> </parser> + <output>/** + * test_tag_not_annotatable: + * + * Tags (except Returns:) don't have annotations + * + * Since: 2.24 + */</output> </test> <test> @@ -154,6 +176,12 @@ tags is wrong...</description> ^</message> </messages> </parser> + <output>/** + * test_multiple_tags: + * + * Since: 2.0: one of these "Since:" + * tags is wrong... + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gi/tag_stability.xml b/tests/scanner/annotationparser/gi/tag_stability.xml index a82d19c7..25c907ff 100644 --- a/tests/scanner/annotationparser/gi/tag_stability.xml +++ b/tests/scanner/annotationparser/gi/tag_stability.xml @@ -21,6 +21,11 @@ </tags> </docblock> </parser> + <output>/** + * annotation_versioned: + * + * Stability: Stable + */</output> </test> <test> @@ -42,6 +47,11 @@ </tags> </docblock> </parser> + <output>/** + * annotation_versioned: + * + * Stability: Unstable + */</output> </test> <test> @@ -63,6 +73,11 @@ </tags> </docblock> </parser> + <output>/** + * annotation_versioned: + * + * Stability: Private + */</output> </test> <test> @@ -84,6 +99,11 @@ </tags> </docblock> </parser> + <output>/** + * annotation_versioned: + * + * Stability: behavior tends to vary depending on the phase of the moon. + */</output> </test> <test> @@ -111,6 +131,13 @@ <message>6: Error: Test: annotations not supported for tag "Stability:".</message> </messages> </parser> + <output>/** + * test_tag_not_annotatable: + * + * Tags (except Returns:) don't have annotations + * + * Stability: Private + */</output> </test> <test> @@ -141,6 +168,11 @@ ^</message> </messages> </parser> + <output>/** + * test_multiple_tags: + * + * Stability: Private + */</output> </test> <test> @@ -168,6 +200,12 @@ </tags> </docblock> </parser> + <output>/** + * test_stability_description: + * + * Stability: Unstable: maybe one day this will work + * correctly... + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gtkdoc/annotations/tester.c.xml b/tests/scanner/annotationparser/gtkdoc/annotations/tester.c.xml index 9fda10b5..bf94edba 100644 --- a/tests/scanner/annotationparser/gtkdoc/annotations/tester.c.xml +++ b/tests/scanner/annotationparser/gtkdoc/annotations/tester.c.xml @@ -23,6 +23,12 @@ <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> @@ -67,6 +73,14 @@ <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> @@ -125,6 +139,17 @@ </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> @@ -166,6 +191,14 @@ </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> @@ -215,6 +248,14 @@ </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> @@ -249,6 +290,13 @@ </tags> </docblock> </parser> + <output>/** + * annotation_elementtype_returns: + * + * Document optional parameters. + * + * Returns: (element-type GObject): A list of #GObject instances. + */</output> </test> <test> @@ -293,6 +341,14 @@ </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> @@ -321,6 +377,12 @@ <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> @@ -359,6 +421,13 @@ <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 index 6d00aa36..0917cd95 100644 --- a/tests/scanner/annotationparser/gtkdoc/annotations/tester.h.xml +++ b/tests/scanner/annotationparser/gtkdoc/annotations/tester.h.xml @@ -28,6 +28,12 @@ <description>small struct</description> </docblock> </parser> + <output>/** + * GtkdocAnnotation: + * @that: (allow-none): eventualy points to something + * + * small struct + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gtkdoc/bugs/tester.c.xml b/tests/scanner/annotationparser/gtkdoc/bugs/tester.c.xml index 1197c9b7..7d766c68 100644 --- a/tests/scanner/annotationparser/gtkdoc/bugs/tester.c.xml +++ b/tests/scanner/annotationparser/gtkdoc/bugs/tester.c.xml @@ -49,6 +49,25 @@ Second paragraph inside subsection. </refsect2>]]></description> </docblock> </parser> + <output><![CDATA[/** + * 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. + * + * Some special characters need escaping. The tests should pass 100\%. + * Try a <ulink url="http://www.gtk.org/gtk-doc/#Top">link containing a # char</ulink>. + * + * <refsect2 id="dummy-id"> + * <title>more details</title> + * <para> + * Second paragraph inside subsection. + * </para> + * </refsect2> + */]]></output> </test> <test> @@ -72,6 +91,12 @@ Second paragraph inside subsection. <description>http://bugzilla.gnome.org/show_bug.cgi?id=141869</description> </docblock> </parser> + <output>/** + * bug_141869_a: + * @pid: arg + * + * http://bugzilla.gnome.org/show_bug.cgi?id=141869 + */</output> </test> <test> @@ -95,6 +120,12 @@ Second paragraph inside subsection. <description>http://bugzilla.gnome.org/show_bug.cgi?id=141869</description> </docblock> </parser> + <output>/** + * bug_141869_b: + * @pid: arg + * + * http://bugzilla.gnome.org/show_bug.cgi?id=141869 + */</output> </test> <test> @@ -118,6 +149,12 @@ Second paragraph inside subsection. <description>http://bugzilla.gnome.org/show_bug.cgi?id=379466</description> </docblock> </parser> + <output>/** + * bug_379466: + * @pid: arg + * + * http://bugzilla.gnome.org/show_bug.cgi?id=379466 + */</output> </test> <test> @@ -157,6 +194,16 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> </tags> </docblock> </parser> + <output>/** + * bug_380824: + * @arg: arg + * + * Returns a value. + * http://bugzilla.gnome.org/show_bug.cgi?id=380824 + * + * Since: 0.1 + * Returns: result + */</output> </test> <test> @@ -181,6 +228,13 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> </tags> </docblock> </parser> + <output>/** + * bug_411739: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=411739 + * + * Returns: result + */</output> </test> <test> @@ -204,6 +258,12 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>http://bugzilla.gnome.org/show_bug.cgi?id=419997</description> </docblock> </parser> + <output>/** + * bug_419997: + * @const_values: arg + * + * http://bugzilla.gnome.org/show_bug.cgi?id=419997 + */</output> </test> <test> @@ -227,6 +287,12 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>http://bugzilla.gnome.org/show_bug.cgi?id=445693</description> </docblock> </parser> + <output>/** + * bug_445693: + * @pid: arg + * + * http://bugzilla.gnome.org/show_bug.cgi?id=445693 + */</output> </test> <test> @@ -251,6 +317,13 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> </tags> </docblock> </parser> + <output>/** + * bug_471014: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=471014 + * + * Returns: result + */</output> </test> <test> @@ -274,6 +347,12 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>http://bugzilla.gnome.org/show_bug.cgi?id=446648</description> </docblock> </parser> + <output>/** + * Bug446648: + * @BUG_446648_FOO: foo + * + * http://bugzilla.gnome.org/show_bug.cgi?id=446648 + */</output> </test> <test> @@ -298,6 +377,13 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> </tags> </docblock> </parser> + <output>/** + * bug_552602: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=552602 + * + * Returns: result + */</output> </test> <test> @@ -322,6 +408,13 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> </tags> </docblock> </parser> + <output>/** + * bug_574654a: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=574654 + * + * Returns: result + */</output> </test> <test> @@ -345,6 +438,12 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>http://bugzilla.gnome.org/show_bug.cgi?id=574654</description> </docblock> </parser> + <output>/** + * bug_574654b: + * @offset: skip this many items + * + * http://bugzilla.gnome.org/show_bug.cgi?id=574654 + */</output> </test> <test> @@ -361,6 +460,11 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>http://bugzilla.gnome.org/show_bug.cgi?id=580300</description> </docblock> </parser> + <output>/** + * bug_580300a_get_type: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=580300 + */</output> </test> <test> @@ -384,6 +488,12 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>http://bugzilla.gnome.org/show_bug.cgi?id=580300</description> </docblock> </parser> + <output>/** + * bug_580300b_get_type: + * @a: value + * + * http://bugzilla.gnome.org/show_bug.cgi?id=580300 + */</output> </test> <test> @@ -400,6 +510,11 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>http://bugzilla.gnome.org/show_bug.cgi?id=580300</description> </docblock> </parser> + <output>/** + * bug_580300c_get_type: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=580300 + */</output> </test> <test> @@ -424,6 +539,13 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> </tags> </docblock> </parser> + <output>/** + * bug_580300d_get_type: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=580300 + * + * Returns: result + */</output> </test> <test> @@ -447,6 +569,12 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>http://bugzilla.gnome.org/show_bug.cgi?id=597937</description> </docblock> </parser> + <output>/** + * bug_597937: + * @function_arg: value + * + * http://bugzilla.gnome.org/show_bug.cgi?id=597937 + */</output> </test> <test> @@ -471,6 +599,13 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> </tags> </docblock> </parser> + <output>/** + * bug_602518a: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=602518 + * + * Returns: result + */</output> </test> <test> @@ -495,6 +630,13 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> </tags> </docblock> </parser> + <output>/** + * bug_602518b: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=602518 + * + * Returns: result + */</output> </test> <test> @@ -519,6 +661,13 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> </tags> </docblock> </parser> + <output>/** + * bug_602518c: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=602518 + * + * Returns: result + */</output> </test> <test> @@ -547,6 +696,13 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>http://bugzilla.gnome.org/show_bug.cgi?id=607445</description> </docblock> </parser> + <output>/** + * bug_607445: + * @a: parameter + * @n: parameter + * + * http://bugzilla.gnome.org/show_bug.cgi?id=607445 + */</output> </test> <test> @@ -575,6 +731,13 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>http://bugzilla.gnome.org/show_bug.cgi?id=610257</description> </docblock> </parser> + <output>/** + * bug_610257: + * @der: parameter + * @len: parameter + * + * http://bugzilla.gnome.org/show_bug.cgi?id=610257 + */</output> </test> <test> @@ -599,6 +762,15 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> </refsect3>]]></description> </docblock> </parser> + <output><![CDATA[/** + * bug_623968a: + * + * <para>test</para> + * <refsect3> + * <title>subsect</title> + * <para>test</para> + * </refsect3> + */]]></output> </test> <test> @@ -625,6 +797,16 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> </refsect3>]]></description> </docblock> </parser> + <output><![CDATA[/** + * bug_623968b: + * + * test + * + * <refsect3> + * <title>subsect</title> + * <para>test</para> + * </refsect3> + */]]></output> </test> <test> @@ -641,6 +823,11 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description><![CDATA[<para>test</para>]]></description> </docblock> </parser> + <output><![CDATA[/** + * bug_623968c: + * + * <para>test</para> + */]]></output> </test> <test> @@ -665,6 +852,13 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> </tags> </docblock> </parser> + <output>/** + * bug_624200a: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=624200 + * + * Returns: result + */</output> </test> <test> @@ -689,6 +883,13 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> </tags> </docblock> </parser> + <output>/** + * bug_624200b: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=624200 + * + * Returns: result + */</output> </test> <test> @@ -722,6 +923,14 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>http://bugzilla.gnome.org/show_bug.cgi?id=638330</description> </docblock> </parser> + <output>/** + * bug_638330: + * @arg1: arg1 + * @data: data + * @length: length + * + * http://bugzilla.gnome.org/show_bug.cgi?id=638330 + */</output> </test> <test> @@ -750,6 +959,13 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>Outputs a message.</description> </docblock> </parser> + <output>/** + * bug_000000_va1: + * @name: a name + * @...: A printf-style message to output + * + * Outputs a message. + */</output> </test> <test> @@ -766,6 +982,11 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>http://bugzilla.gnome.org/show_bug.cgi?id=624001</description> </docblock> </parser> + <output>/** + * bug_624001a: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=624001 + */</output> </test> <test> @@ -782,6 +1003,11 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>http://bugzilla.gnome.org/show_bug.cgi?id=624001</description> </docblock> </parser> + <output>/** + * bug_624001b: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=624001 + */</output> </test> <test> @@ -798,6 +1024,11 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>http://bugzilla.gnome.org/show_bug.cgi?id=624001</description> </docblock> </parser> + <output>/** + * bug_624001c: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=624001 + */</output> </test> <test> @@ -814,6 +1045,11 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>http://bugzilla.gnome.org/show_bug.cgi?id=624001</description> </docblock> </parser> + <output>/** + * bug_624001d: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=624001 + */</output> </test> <test> @@ -830,6 +1066,11 @@ http://bugzilla.gnome.org/show_bug.cgi?id=380824</description> <description>http://bugzilla.gnome.org/show_bug.cgi?id=624001</description> </docblock> </parser> + <output>/** + * bug_624001e: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=624001 + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gtkdoc/bugs/tester.h.xml b/tests/scanner/annotationparser/gtkdoc/bugs/tester.h.xml index 39fe878d..5dad3cb8 100644 --- a/tests/scanner/annotationparser/gtkdoc/bugs/tester.h.xml +++ b/tests/scanner/annotationparser/gtkdoc/bugs/tester.h.xml @@ -33,6 +33,14 @@ <description>http://bugzilla.gnome.org/show_bug.cgi?id=324535</description> </docblock> </parser> + <output>/** + * Bug324535: + * @BUG_324535_A: enum 1 + * @BUG_324535_B: enum 2 + * @BUG_324535_C: enum 3 + * + * http://bugzilla.gnome.org/show_bug.cgi?id=324535 + */</output> </test> <test> @@ -56,6 +64,12 @@ <description>http://bugzilla.gnome.org/show_bug.cgi?id=481811</description> </docblock> </parser> + <output>/** + * bug_481811: + * @x: argument + * + * http://bugzilla.gnome.org/show_bug.cgi?id=481811 + */</output> </test> <test> @@ -89,6 +103,14 @@ <description>http://bugzilla.gnome.org/show_bug.cgi?id=501038</description> </docblock> </parser> + <output>/** + * bug_501038: + * @a: value + * @b: deprecated value + * @_b: scrambled deprecated value + * + * http://bugzilla.gnome.org/show_bug.cgi?id=501038 + */</output> </test> <test> @@ -112,6 +134,12 @@ <description>http://bugzilla.gnome.org/show_bug.cgi?id=460127</description> </docblock> </parser> + <output>/** + * bug_460127: + * @a: field + * + * http://bugzilla.gnome.org/show_bug.cgi?id=460127 + */</output> </test> <test> @@ -128,6 +156,11 @@ <description>http://bugzilla.gnome.org/show_bug.cgi?id=477532</description> </docblock> </parser> + <output>/** + * bug_477532: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=477532 + */</output> </test> <test> @@ -151,6 +184,12 @@ <description>http://bugzilla.gnome.org/show_bug.cgi?id=446648</description> </docblock> </parser> + <output>/** + * Bug446648: + * @BUG_446648_FOO: field + * + * http://bugzilla.gnome.org/show_bug.cgi?id=446648 + */</output> </test> <test> @@ -174,6 +213,12 @@ <description>http://bugzilla.gnome.org/show_bug.cgi?id=512154</description> </docblock> </parser> + <output>/** + * Bug512154: + * @index: field + * + * http://bugzilla.gnome.org/show_bug.cgi?id=512154 + */</output> </test> <test> @@ -207,6 +252,14 @@ <description>http://bugzilla.gnome.org/show_bug.cgi?id=512155</description> </docblock> </parser> + <output>/** + * bug_512155a_function_pointer_t: + * @arg1: param 1 + * @arg2: param 1 + * @arg3: param 1 + * + * http://bugzilla.gnome.org/show_bug.cgi?id=512155 + */</output> </test> <test> @@ -240,6 +293,14 @@ <description>http://bugzilla.gnome.org/show_bug.cgi?id=512155</description> </docblock> </parser> + <output>/** + * bug_512155b_function_pointer_t: + * @arg1: param 1 + * @arg2: param 1 + * @arg3: param 1 + * + * http://bugzilla.gnome.org/show_bug.cgi?id=512155 + */</output> </test> <test> @@ -273,6 +334,14 @@ <description>http://bugzilla.gnome.org/show_bug.cgi?id=512155</description> </docblock> </parser> + <output>/** + * bug_512155c_function_pointer_t: + * @arg1: param 1 + * @arg2: param 1 + * @arg3: param 1 + * + * http://bugzilla.gnome.org/show_bug.cgi?id=512155 + */</output> </test> <test> @@ -293,6 +362,13 @@ <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=530758#c1">Test</ulink>]]></description> </docblock> </parser> + <output><![CDATA[/** + * BUG_530758: + * + * {{![CDATA[http://bugzilla.gnome.org/show_bug.cgi?id=530758#c1]]!}} + * + * <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=530758#c1">Test</ulink> + */]]></output> </test> <test> @@ -324,6 +400,14 @@ </tags> </docblock> </parser> + <output>/** + * bug_532395a: + * @number: a number + * + * http://bugzilla.gnome.org/show_bug.cgi?id=532395 + * + * Returns: number + */</output> </test> <test> @@ -340,6 +424,11 @@ <description>http://bugzilla.gnome.org/show_bug.cgi?id=532395</description> </docblock> </parser> + <output>/** + * bug_532395b: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=532395 + */</output> </test> <test> @@ -371,6 +460,14 @@ </tags> </docblock> </parser> + <output>/** + * bug_544172: + * @self: object pointer. + * + * http://bugzilla.gnome.org/show_bug.cgi?id=544172 + * + * Returns: result or %NULL. + */</output> </test> <test> @@ -394,6 +491,12 @@ <description>http://bugzilla.gnome.org/show_bug.cgi?id=554833</description> </docblock> </parser> + <output>/** + * bug_554833: + * @i: value; + * + * http://bugzilla.gnome.org/show_bug.cgi?id=554833 + */</output> </test> <test> @@ -418,6 +521,13 @@ </tags> </docblock> </parser> + <output>/** + * bug_554833_new: + * + * http://bugzilla.gnome.org/show_bug.cgi?id=554833 + * + * Returns: result + */</output> </test> <test> @@ -446,6 +556,13 @@ <description>http://bugzilla.gnome.org/show_bug.cgi?id=165425</description> </docblock> </parser> + <output>/** + * Bug165425a: + * @i: data as int + * @f: data as float + * + * http://bugzilla.gnome.org/show_bug.cgi?id=165425 + */</output> </test> <test> @@ -474,6 +591,13 @@ <description>http://bugzilla.gnome.org/show_bug.cgi?id=165425</description> </docblock> </parser> + <output>/** + * Bug165425b: + * @i: data as int + * @f: data as float + * + * http://bugzilla.gnome.org/show_bug.cgi?id=165425 + */</output> </test> <test> @@ -507,6 +631,14 @@ <description>https://bugzilla.gnome.org/show_bug.cgi?id=642998</description> </docblock> </parser> + <output>/** + * Bug642998: + * @red: red color intensity, from 0–255 + * @green: green color intensity, from 0–255 + * @blue: blue color intensity, from 0–255 + * + * https://bugzilla.gnome.org/show_bug.cgi?id=642998 + */</output> </test> <test> @@ -555,6 +687,17 @@ <description>https://bugzilla.gnome.org/show_bug.cgi?id=644291</description> </docblock> </parser> + <output>/** + * Bug644291: + * @BUG_644291_START: foo + * @BUG_644291_TEXT: bar + * @BUG_644291_END: milk + * @BUG_644291_ATTRIBUTE: comes + * @BUG_644291_XMLNS: from + * @BUG_644291_ASSIGN_TO: cows + * + * https://bugzilla.gnome.org/show_bug.cgi?id=644291 + */</output> </test> <test> @@ -583,6 +726,13 @@ <description>Outputs a message.</description> </docblock> </parser> + <output>/** + * BUG_000000_VA2: + * @name: a name + * @...: A printf-style message to output + * + * Outputs a message. + */</output> </test> <test> @@ -611,6 +761,13 @@ <description>Outputs a message.</description> </docblock> </parser> + <output>/** + * BUG_000000_VA3: + * @name: a name + * @...: A printf-style message to output + * + * Outputs a message. + */</output> </test> <test> @@ -631,6 +788,13 @@ but not if we remove the blank line before "int b";</description> </docblock> </parser> + <output>/** + * Bug000000Scope: + * + * Opaque structure. + * "warning: Field descriptions for Bug000000Scope are missing in source code comment block." + * but not if we remove the blank line before "int b"; + */</output> </test> <test> @@ -664,6 +828,14 @@ but not if we remove the blank line before "int b";</description> <description>test.</description> </docblock> </parser> + <output>/** + * gst_play_marshal_BUFFER__BOXED: + * @closure: test + * @return_value: test + * @marshal_data: test + * + * test. + */</output> </test> <test> @@ -680,6 +852,11 @@ but not if we remove the blank line before "int b";</description> <description>https://bugzilla.gnome.org/show_bug.cgi?id=656773</description> </docblock> </parser> + <output>/** + * BUG_656773a: + * + * https://bugzilla.gnome.org/show_bug.cgi?id=656773 + */</output> </test> <test> @@ -696,6 +873,11 @@ but not if we remove the blank line before "int b";</description> <description>https://bugzilla.gnome.org/show_bug.cgi?id=656773</description> </docblock> </parser> + <output>/** + * BUG_656773b: + * + * https://bugzilla.gnome.org/show_bug.cgi?id=656773 + */</output> </test> <test> @@ -712,6 +894,11 @@ but not if we remove the blank line before "int b";</description> <description>https://bugzilla.gnome.org/show_bug.cgi?id=656773</description> </docblock> </parser> + <output>/** + * BUG_656773c: + * + * https://bugzilla.gnome.org/show_bug.cgi?id=656773 + */</output> </test> <test> @@ -728,6 +915,11 @@ but not if we remove the blank line before "int b";</description> <description>https://bugzilla.gnome.org/show_bug.cgi?id=656946</description> </docblock> </parser> + <output>/** + * BUG_656946: + * + * https://bugzilla.gnome.org/show_bug.cgi?id=656946 + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gtkdoc/empty/tester.c.xml b/tests/scanner/annotationparser/gtkdoc/empty/tester.c.xml index 6419370a..65bda61f 100644 --- a/tests/scanner/annotationparser/gtkdoc/empty/tester.c.xml +++ b/tests/scanner/annotationparser/gtkdoc/empty/tester.c.xml @@ -29,6 +29,15 @@ As described in http://bugzilla.gnome.org/show_bug.cgi?id=457077 it returns nothing.]]></description> </docblock> </parser> + <output><![CDATA[/** + * 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. + */]]></output> </test> <test> @@ -52,6 +61,12 @@ returns nothing.]]></description> <description>lonely function</description> </docblock> </parser> - </test> + <output>/** + * test: + * @a: arg + * + * lonely function + */</output> +</test> </tests> diff --git a/tests/scanner/annotationparser/gtkdoc/fail/tester.c.xml b/tests/scanner/annotationparser/gtkdoc/fail/tester.c.xml index f76efdda..40fbbff5 100644 --- a/tests/scanner/annotationparser/gtkdoc/fail/tester.c.xml +++ b/tests/scanner/annotationparser/gtkdoc/fail/tester.c.xml @@ -19,22 +19,27 @@ * @title: GtkdocTesterNoLongDesc */</input> <parser> - <docblock> - <identifier> - <name>SECTION:tester_nolongdesc</name> - </identifier> - <parameters> - <parameter> - <name>short_description</name> - <description>module for gtk-doc unit test</description> - </parameter> - <parameter> - <name>title</name> - <description>GtkdocTesterNoLongDesc</description> - </parameter> - </parameters> - </docblock> + <docblock> + <identifier> + <name>SECTION:tester_nolongdesc</name> + </identifier> + <parameters> + <parameter> + <name>short_description</name> + <description>module for gtk-doc unit test</description> + </parameter> + <parameter> + <name>title</name> + <description>GtkdocTesterNoLongDesc</description> + </parameter> + </parameters> + </docblock> </parser> + <output>/** + * SECTION:tester_nolongdesc + * @short_description: module for gtk-doc unit test + * @title: GtkdocTesterNoLongDesc + */</output> </test> <test> @@ -45,19 +50,25 @@ * This file contains non-sense code for the sole purpose of testing the docs. */</input> <parser> - <docblock> - <identifier> - <name>SECTION:tester_noshortdesc</name> - </identifier> - <parameters> - <parameter> - <name>title</name> - <description>GtkdocTesterNoShortDesc</description> - </parameter> - </parameters> - <description>This file contains non-sense code for the sole purpose of testing the docs.</description> - </docblock> + <docblock> + <identifier> + <name>SECTION:tester_noshortdesc</name> + </identifier> + <parameters> + <parameter> + <name>title</name> + <description>GtkdocTesterNoShortDesc</description> + </parameter> + </parameters> + <description>This file contains non-sense code for the sole purpose of testing the docs.</description> + </docblock> </parser> + <output>/** + * SECTION:tester_noshortdesc + * @title: GtkdocTesterNoShortDesc + * + * This file contains non-sense code for the sole purpose of testing the docs. + */</output> </test> <test> @@ -69,23 +80,30 @@ * This file contains non-sense code for the sole purpose of testing the docs. */</input> <parser> - <docblock> - <identifier> - <name>SECTION:tester_brokendocs</name> - </identifier> - <parameters> - <parameter> - <name>short_description</name> - <description>module for gtk-doc unit test</description> - </parameter> - <parameter> - <name>title</name> - <description>GtkdocTesterBrokenDocs</description> - </parameter> - </parameters> - <description>This file contains non-sense code for the sole purpose of testing the docs.</description> - </docblock> + <docblock> + <identifier> + <name>SECTION:tester_brokendocs</name> + </identifier> + <parameters> + <parameter> + <name>short_description</name> + <description>module for gtk-doc unit test</description> + </parameter> + <parameter> + <name>title</name> + <description>GtkdocTesterBrokenDocs</description> + </parameter> + </parameters> + <description>This file contains non-sense code for the sole purpose of testing the docs.</description> + </docblock> </parser> + <output>/** + * SECTION:tester_brokendocs + * @short_description: module for gtk-doc unit test + * @title: GtkdocTesterBrokenDocs + * + * This file contains non-sense code for the sole purpose of testing the docs. + */</output> </test> <test> @@ -93,12 +111,15 @@ * func_no_docs: */</input> <parser> - <docblock> - <identifier> - <name>func_no_docs</name> - </identifier> - </docblock> + <docblock> + <identifier> + <name>func_no_docs</name> + </identifier> + </docblock> </parser> + <output>/** + * func_no_docs: + */</output> </test> <test> @@ -108,13 +129,18 @@ * Here we document the function but not the parameters. */</input> <parser> - <docblock> - <identifier> - <name>func_no_item_docs</name> - </identifier> - <description>Here we document the function but not the parameters.</description> - </docblock> + <docblock> + <identifier> + <name>func_no_item_docs</name> + </identifier> + <description>Here we document the function but not the parameters.</description> + </docblock> </parser> + <output>/** + * func_no_item_docs: + * + * Here we document the function but not the parameters. + */</output> </test> <test> @@ -125,19 +151,25 @@ * Here we document the function but not all the parameters. */</input> <parser> - <docblock> - <identifier> - <name>func_incomplete_docs</name> - </identifier> - <parameters> - <parameter> - <name>a</name> - <description>a value</description> - </parameter> - </parameters> - <description>Here we document the function but not all the parameters.</description> - </docblock> + <docblock> + <identifier> + <name>func_incomplete_docs</name> + </identifier> + <parameters> + <parameter> + <name>a</name> + <description>a value</description> + </parameter> + </parameters> + <description>Here we document the function but not all the parameters.</description> + </docblock> </parser> + <output>/** + * func_incomplete_docs: + * @a: a value + * + * Here we document the function but not all the parameters. + */</output> </test> <test> @@ -150,27 +182,35 @@ * Here we document the function and more than the actual parameters. */</input> <parser> - <docblock> - <identifier> - <name>func_unused_docs</name> - </identifier> - <parameters> - <parameter> - <name>a</name> - <description>a value</description> - </parameter> - <parameter> - <name>b</name> - <description>a value</description> - </parameter> - <parameter> - <name>c</name> - <description>an unexisting value</description> - </parameter> - </parameters> - <description>Here we document the function and more than the actual parameters.</description> - </docblock> + <docblock> + <identifier> + <name>func_unused_docs</name> + </identifier> + <parameters> + <parameter> + <name>a</name> + <description>a value</description> + </parameter> + <parameter> + <name>b</name> + <description>a value</description> + </parameter> + <parameter> + <name>c</name> + <description>an unexisting value</description> + </parameter> + </parameters> + <description>Here we document the function and more than the actual parameters.</description> + </docblock> </parser> + <output>/** + * func_unused_docs: + * @a: a value + * @b: a value + * @c: an unexisting value + * + * Here we document the function and more than the actual parameters. + */</output> </test> </tests> diff --git a/tests/scanner/annotationparser/gtkdoc/fail/tester.h.xml b/tests/scanner/annotationparser/gtkdoc/fail/tester.h.xml index 2076e526..069ae71a 100644 --- a/tests/scanner/annotationparser/gtkdoc/fail/tester.h.xml +++ b/tests/scanner/annotationparser/gtkdoc/fail/tester.h.xml @@ -16,6 +16,11 @@ <description>Here we document the macro but not the parameters.</description> </docblock> </parser> + <output>/** + * MACRO_NO_ITEM_DOCS: + * + * Here we document the macro but not the parameters. + */</output> </test> <test> @@ -39,6 +44,12 @@ <description>Here we document the macro but not all the parameters.</description> </docblock> </parser> + <output>/** + * MACRO_INCOMPLETE_DOCS: + * @a: a value + * + * Here we document the macro but not all the parameters. + */</output> </test> <test> @@ -72,6 +83,14 @@ <description>Here we document the macro and more than the actual parameters.</description> </docblock> </parser> + <output>/** + * MACRO_UNUSED_DOCS: + * @a: a value + * @b: a value + * @c: an unexisting value + * + * Here we document the macro and more than the actual parameters. + */</output> </test> <test> @@ -90,6 +109,12 @@ http://bugzilla.gnome.org/show_bug.cgi?id=568711</description> </docblock> </parser> + <output>/** + * EnumNoItemDocs: + * + * Here we document the enum but not the values. + * http://bugzilla.gnome.org/show_bug.cgi?id=568711 + */</output> </test> <test> @@ -113,6 +138,12 @@ http://bugzilla.gnome.org/show_bug.cgi?id=568711</description> <description>Here we document the enum but not all the values.</description> </docblock> </parser> + <output>/** + * EnumIncompleteDocs: + * @ENUM_INCOMPLETE_DOCS_1: a value + * + * Here we document the enum but not all the values. + */</output> </test> <test> @@ -146,6 +177,14 @@ http://bugzilla.gnome.org/show_bug.cgi?id=568711</description> <description>Here we document the enum and more than the actual values.</description> </docblock> </parser> + <output>/** + * EnumUnusedDocs: + * @ENUM_UNUSED_DOCS_1: a value + * @ENUM_UNUSED_DOCS_2: a value + * @ENUM_UNUSED_DOCS_3: an unexisting value + * + * Here we document the enum and more than the actual values. + */</output> </test> <test> @@ -162,6 +201,11 @@ http://bugzilla.gnome.org/show_bug.cgi?id=568711</description> <description>Here we document the struct but not the values.</description> </docblock> </parser> + <output>/** + * StructNoItemDocs: + * + * Here we document the struct but not the values. + */</output> </test> <test> @@ -185,6 +229,12 @@ http://bugzilla.gnome.org/show_bug.cgi?id=568711</description> <description>Here we document the struct but not all the values.</description> </docblock> </parser> + <output>/** + * StructIncompleteDocs: + * @a: a value + * + * Here we document the struct but not all the values. + */</output> </test> <test> @@ -218,6 +268,14 @@ http://bugzilla.gnome.org/show_bug.cgi?id=568711</description> <description>Here we document the struct and more than the actual values.</description> </docblock> </parser> + <output>/** + * StructUnusedDocs: + * @a: a value + * @b: a value + * @c: an unexisting value + * + * Here we document the struct and more than the actual values. + */</output> </test> </tests> 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> diff --git a/tests/scanner/annotationparser/test_parser.py b/tests/scanner/annotationparser/test_parser.py index 99ef2c21..ef4d7462 100644 --- a/tests/scanner/annotationparser/test_parser.py +++ b/tests/scanner/annotationparser/test_parser.py @@ -22,8 +22,7 @@ ''' test_parser.py -Tests ensuring the "parse tree" built by annotationparser.py -continues to function correctly. +Tests ensuring annotationparser.py continues to function correctly. ''' @@ -33,7 +32,7 @@ import subprocess import unittest import xml.etree.ElementTree as etree -from giscanner.annotationparser import GtkDocCommentBlockParser +from giscanner.annotationparser import GtkDocCommentBlockParser, GtkDocCommentBlockWriter from giscanner.ast import Namespace from giscanner.message import MessageLogger, WARNING, ERROR, FATAL @@ -120,6 +119,31 @@ class TestCommentBlock(unittest.TestCase): msg += self._diff_messages([expected_message], [emitted_message]) self.assertTrue(expected_message == emitted_message, msg) + # Compare serialized with expected comment block + expected_serialized = testcase.find(ns('{}output')) + indent = True + + if expected_serialized is None: + expected_serialized = '' + else: + if 'indent' in expected_serialized.attrib: + indent = expected_serialized.attrib['indent'] + if indent.lower() in ('false', '0'): + indent = False + elif indent.lower() in ('true', '1'): + indent = True + else: + self.assert_(False, 'Unknown value for "indent" attribute: %s' % (indent)) + + expected_serialized = expected_serialized.text + '\n' or None + + commentblockwriter = GtkDocCommentBlockWriter(indent=indent) + serialized = commentblockwriter.write(parsed_docblock) + + msg = 'Serialized comment block does not match expected output:\n\n' + msg += self._diff_messages(expected_serialized.split('\n'), serialized.split('\n')) + self.assertTrue(expected_serialized == serialized, msg) + return do_test def parsed2tree(self, docblock): @@ -230,8 +254,6 @@ class TestCommentBlock(unittest.TestCase): return parsed def expected2tree(self, docblock): - # Note: this sucks, but we can't rely on etree.tostring() to generate useable output :( - expected = '' if docblock is not None: @@ -364,6 +386,7 @@ def create_tests(logger, tests_dir, tests_file): fix_cdata_elements = tests_tree.findall(ns('{}test/{}input')) fix_cdata_elements += tests_tree.findall(ns('.//{}description')) + fix_cdata_elements += tests_tree.findall(ns('{}test/{}output')) for element in fix_cdata_elements: if element.text: |