From af2e146f5f24b93322ad0112d37a8e41222c3085 Mon Sep 17 00:00:00 2001 From: Dieter Verfaillie Date: Wed, 4 Jul 2012 11:58:13 +0200 Subject: giscanner: add AnnotationParser tests The tests in giscanner/annotationpatters.py only test the regular expression programs used when parsing GTK-Doc comment blocks but do not test the structure of the resulting "parse tree". This patch adds 193 GTK-Doc comment blocks and the expected results AnnotationParser should return (with it's current level of understanding of GTK-Doc comment block syntax). These are compared by tests/scanner/annotationparser/test_parser.py which complains with a diff on failure. https://bugzilla.gnome.org/show_bug.cgi?id=688897 --- .../annotationparser/gtkdoc/gobject/gtypes.h.xml | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml (limited to 'tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml') diff --git a/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml b/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml new file mode 100644 index 00000000..f4e76e58 --- /dev/null +++ b/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml @@ -0,0 +1,57 @@ + + + + + + /** + * GtkdocPlainOldData: + * @n: Some integer member. + * @x: Some floating point member. + * + * Unboxed plain old data that should default to public members. + **/ + + + GtkdocPlainOldData + + + + n + Some integer member. + + + x + Some floating point member. + + + Unboxed plain old data that should default to public members. + + + + + /** + * GtkdocBoxedPlainOldData: + * @n: Some integer member. + * @x: Some floating point member. + * + * Boxed plain old data that should default to public members. + **/ + + + GtkdocBoxedPlainOldData + + + + n + Some integer member. + + + x + Some floating point member. + + + Boxed plain old data that should default to public members. + + + + -- cgit v1.2.1 From d5029e03561a1493470c43f8d2a08b90758baccf Mon Sep 17 00:00:00 2001 From: Dieter Verfaillie Date: Tue, 17 Jul 2012 17:19:14 +0200 Subject: giscanner: update annotationparser to most recent gtkdoc-mkdb bug fixes. This patch adds a test for and implements a more generic solution to GTK-Doc commit 47abcd53b8489ebceec9e394676512a181c1f1f6 https://bugzilla.gnome.org/show_bug.cgi?id=688897 --- .../annotationparser/gtkdoc/gobject/gtypes.h.xml | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml') diff --git a/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml b/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml index f4e76e58..1d188271 100644 --- a/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml +++ b/tests/scanner/annotationparser/gtkdoc/gobject/gtypes.h.xml @@ -2,6 +2,33 @@ + + /** + * GtkdocEnum: + * @GTKDOC_ENUM_V1: first + * @GTKDOC_ENUM_V2: second + * Since: 0.10 + * + * Enum values for the #GtkdocEnum type. + */ + + + GtkdocEnum + + + + GTKDOC_ENUM_V1 + first + + + GTKDOC_ENUM_V2 + second Since: 0.10 + + + Enum values for the #GtkdocEnum type. + + + /** * GtkdocPlainOldData: -- cgit v1.2.1