diff options
Diffstat (limited to 'tests/scanner/annotationparser/gtkdoc/fail')
-rw-r--r-- | tests/scanner/annotationparser/gtkdoc/fail/tester.c.xml | 216 | ||||
-rw-r--r-- | tests/scanner/annotationparser/gtkdoc/fail/tester.h.xml | 281 |
2 files changed, 497 insertions, 0 deletions
diff --git a/tests/scanner/annotationparser/gtkdoc/fail/tester.c.xml b/tests/scanner/annotationparser/gtkdoc/fail/tester.c.xml new file mode 100644 index 00000000..40fbbff5 --- /dev/null +++ b/tests/scanner/annotationparser/gtkdoc/fail/tester.c.xml @@ -0,0 +1,216 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test"> + +<test> + <input>/* + * SECTION:tester_nodocs + * @short_description: module for gtk-doc unit test + * @title: GtkdocTesterNoDocs + * + * This file contains non-sense code for the sole purpose of testing the docs. + */</input> +</test> + +<test> + <input>/** + * SECTION:tester_nolongdesc + * @short_description: module for gtk-doc unit test + * @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> + </parser> + <output>/** + * SECTION:tester_nolongdesc + * @short_description: module for gtk-doc unit test + * @title: GtkdocTesterNoLongDesc + */</output> +</test> + +<test> + <input>/** + * SECTION:tester_noshortdesc + * @title: GtkdocTesterNoShortDesc + * + * 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> + </parser> + <output>/** + * SECTION:tester_noshortdesc + * @title: GtkdocTesterNoShortDesc + * + * This file contains non-sense code for the sole purpose of testing the docs. + */</output> +</test> + +<test> + <input>/** + * 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. + */</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> + </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> + <input>/** + * func_no_docs: + */</input> + <parser> + <docblock> + <identifier> + <name>func_no_docs</name> + </identifier> + </docblock> + </parser> + <output>/** + * func_no_docs: + */</output> +</test> + +<test> + <input>/** + * func_no_item_docs: + * + * 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> + </parser> + <output>/** + * func_no_item_docs: + * + * Here we document the function but not the parameters. + */</output> +</test> + +<test> + <input>/** + * func_incomplete_docs: + * @a: a value + * + * 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> + </parser> + <output>/** + * func_incomplete_docs: + * @a: a value + * + * Here we document the function but not all the parameters. + */</output> +</test> + +<test> + <input>/** + * func_unused_docs: + * @a: a value + * @b: a value + * @c: an unexisting value + * + * 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> + </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 new file mode 100644 index 00000000..069ae71a --- /dev/null +++ b/tests/scanner/annotationparser/gtkdoc/fail/tester.h.xml @@ -0,0 +1,281 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test"> + +<test> +<input>/** + * MACRO_NO_ITEM_DOCS: + * + * Here we document the macro but not the parameters. + */</input> + <parser> + <docblock> + <identifier> + <name>MACRO_NO_ITEM_DOCS</name> + </identifier> + <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> +<input>/** + * MACRO_INCOMPLETE_DOCS: + * @a: a value + * + * Here we document the macro but not all the parameters. + */</input> + <parser> + <docblock> + <identifier> + <name>MACRO_INCOMPLETE_DOCS</name> + </identifier> + <parameters> + <parameter> + <name>a</name> + <description>a value</description> + </parameter> + </parameters> + <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> +<input>/** + * MACRO_UNUSED_DOCS: + * @a: a value + * @b: a value + * @c: an unexisting value + * + * Here we document the macro and more than the actual parameters. + */</input> + <parser> + <docblock> + <identifier> + <name>MACRO_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 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> +<input>/** + * EnumNoItemDocs: + * + * Here we document the enum but not the values. + * http://bugzilla.gnome.org/show_bug.cgi?id=568711 + */</input> + <parser> + <docblock> + <identifier> + <name>EnumNoItemDocs</name> + </identifier> + <description>Here we document the enum but not the values. +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> +<input>/** + * EnumIncompleteDocs: + * @ENUM_INCOMPLETE_DOCS_1: a value + * + * Here we document the enum but not all the values. + */</input> + <parser> + <docblock> + <identifier> + <name>EnumIncompleteDocs</name> + </identifier> + <parameters> + <parameter> + <name>ENUM_INCOMPLETE_DOCS_1</name> + <description>a value</description> + </parameter> + </parameters> + <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> +<input>/** + * 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. + */</input> + <parser> + <docblock> + <identifier> + <name>EnumUnusedDocs</name> + </identifier> + <parameters> + <parameter> + <name>ENUM_UNUSED_DOCS_1</name> + <description>a value</description> + </parameter> + <parameter> + <name>ENUM_UNUSED_DOCS_2</name> + <description>a value</description> + </parameter> + <parameter> + <name>ENUM_UNUSED_DOCS_3</name> + <description>an unexisting value</description> + </parameter> + </parameters> + <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> +<input>/** + * StructNoItemDocs: + * + * Here we document the struct but not the values. + */</input> + <parser> + <docblock> + <identifier> + <name>StructNoItemDocs</name> + </identifier> + <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> +<input>/** + * StructIncompleteDocs: + * @a: a value + * + * Here we document the struct but not all the values. + */</input> + <parser> + <docblock> + <identifier> + <name>StructIncompleteDocs</name> + </identifier> + <parameters> + <parameter> + <name>a</name> + <description>a value</description> + </parameter> + </parameters> + <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> +<input>/** + * StructUnusedDocs: + * @a: a value + * @b: a value + * @c: an unexisting value + * + * Here we document the struct and more than the actual values. + */</input> + <parser> + <docblock> + <identifier> + <name>StructUnusedDocs</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 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> |