From 5d338847ffdce68f28ffefa3925bab8394e780d0 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 29 Aug 2012 06:02:59 -0300 Subject: Update tests to show off some new features These includes more proper links and fundamentals. --- .../DocExamples.Obj.method.page | 40 +++++++++++++++++---- .../DocExamples.Obj.method.page | 41 ++++++++++++++++++---- tests/doctool/doc-examples-obj.c | 19 +++++++--- tests/doctool/doc-examples-obj.h | 3 +- 4 files changed, 86 insertions(+), 17 deletions(-) diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.method.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.method.page index f6c2eba5..5f27f96f 100644 --- a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.method.page +++ b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.method.page @@ -10,7 +10,7 @@ - void + gboolean doc_examples_obj_method @@ -25,28 +25,56 @@ gfloat second_arg + + gboolean + boolean_arg + + + gpointer + pointer_arg + + + gchar* + string + doc_examples_obj_method -void doc_examples_obj_method (DocExamplesObj *self, +gboolean doc_examples_obj_method (DocExamplesObj *self, gint first_arg, - gfloat second_arg); + gfloat second_arg, + gboolean boolean_arg, + gpointer pointer_arg, + gchar* string); -

This is an example of how to document a method.

+

This is an example of how to document a method.

You should call this on a DocExamples.Obj that was +created with doc_examples_obj_new.

This should be a %FALSEALARM.

- + + + + + + + + + + + + + - +

first_arg :

first argument

A DocExamples.Obj.

second_arg :

second argument

boolean_arg :

You should always pass TRUE.

pointer_arg :

If not NULL, do a thing.

string :

A NULL-terminated string.

Returns :

Either FALSE or something FALSE-y.

Since 0.99

diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page index 9f7e4963..02f3a002 100644 --- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page +++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page @@ -10,7 +10,7 @@ - none + gboolean doc_examples_obj_method @@ -25,25 +25,54 @@ gfloat second_arg + + gboolean + boolean_arg + + + gpointer + pointer_arg + + + utf8 + string + method -@accepts(gint, gfloat) -@returns(none) -def method(first_arg, second_arg) +@accepts(gint, gfloat, gboolean, gpointer, utf8) +@returns(gboolean) +def method(first_arg, second_arg, boolean_arg, pointer_arg, string) -

This is an example of how to document a method.

+

This is an example of how to document a method.

You should call this on a DocExamples.Obj that was +created with Obj.new.

This should be a %FALSEALARM.

- + + + + + + + + + + + + + + + + +

first_arg :

first argument

A DocExamples.Obj.

second_arg :

second argument

boolean_arg :

You should always pass True.

pointer_arg :

If not None, do a thing.

string :

A None-terminated string.

Returns :

Either False or something False-y.

Since 0.99

diff --git a/tests/doctool/doc-examples-obj.c b/tests/doctool/doc-examples-obj.c index 0839f1c2..44360d9d 100644 --- a/tests/doctool/doc-examples-obj.c +++ b/tests/doctool/doc-examples-obj.c @@ -102,15 +102,26 @@ doc_examples_obj_new (void) /** * doc_examples_obj_method: - * @first_arg: first argument + * @first_arg: A #DocExamplesObj. * @second_arg: second argument + * @boolean_arg: You should always pass %TRUE. + * @pointer_arg: (allow-none): If not %NULL, do a thing. + * @string: A %NULL-terminated string. * * This is an example of how to document a method. * + * You should call this on a #DocExamplesObj that was + * created with doc_examples_obj_new(). + * + * This should be a %FALSEALARM. + * * Since: 0.99 + * + * Returns: Either %FALSE or something %FALSE-y. */ -void -doc_examples_obj_method (DocExamplesObj *self, gint first_arg, gfloat second_arg) +gboolean +doc_examples_obj_method (DocExamplesObj *self, gint first_arg, gfloat second_arg, + gboolean boolean_arg, gpointer pointer_arg, gchar *string) { - + return FALSE; } diff --git a/tests/doctool/doc-examples-obj.h b/tests/doctool/doc-examples-obj.h index 7bc9e1da..c8840d7a 100644 --- a/tests/doctool/doc-examples-obj.h +++ b/tests/doctool/doc-examples-obj.h @@ -56,7 +56,8 @@ struct _DocExamplesObjClass GType doc_examples_obj_get_type (void) G_GNUC_CONST; DocExamplesObj *doc_examples_obj_new (void); -void doc_examples_obj_method (DocExamplesObj *self, gint first_arg, gfloat second_arg); +gboolean doc_examples_obj_method (DocExamplesObj *self, gint first_arg, gfloat second_arg, + gboolean boolean_arg, gpointer pointer_arg, gchar *string); G_END_DECLS -- cgit v1.2.1