diff options
Diffstat (limited to 'tests/scanner/annotationparser/gi/identifier_section.xml')
-rw-r--r-- | tests/scanner/annotationparser/gi/identifier_section.xml | 329 |
1 files changed, 329 insertions, 0 deletions
diff --git a/tests/scanner/annotationparser/gi/identifier_section.xml b/tests/scanner/annotationparser/gi/identifier_section.xml new file mode 100644 index 00000000..35ffec65 --- /dev/null +++ b/tests/scanner/annotationparser/gi/identifier_section.xml @@ -0,0 +1,329 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test"> + +<test> + <!-- + Section documentation including all optional metadata. + --> + <input>/** + * 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 ... + */</input> + <parser> + <docblock> + <identifier> + <name>SECTION:meepapp</name> + </identifier> + <parameters> + <parameter> + <name>short_description</name> + <description>the application class</description> + </parameter> + <parameter> + <name>title</name> + <description>Meep application</description> + </parameter> + <parameter> + <name>section_id</name> + </parameter> + <parameter> + <name>see_also</name> + <description>#MeepSettings</description> + </parameter> + <parameter> + <name>stability</name> + <description>Stable</description> + </parameter> + <parameter> + <name>include</name> + <description>meep/app.h</description> + </parameter> + <parameter> + <name>image</name> + <description>application.png</description> + </parameter> + </parameters> + <description>The application class handles ...</description> + </docblock> + </parser> +</test> + +<test> + <!-- + Broken comment block with empty line between identifier and parameters parts. + --> + <input>/** + * 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 ... + */</input> + <parser> + <docblock> + <identifier> + <name>SECTION:meepapp</name> + </identifier> + <parameters> + <parameter> + <name>short_description</name> + <description>the application class</description> + </parameter> + <parameter> + <name>title</name> + <description>Meep application</description> + </parameter> + <parameter> + <name>section_id</name> + </parameter> + <parameter> + <name>see_also</name> + <description>#MeepSettings</description> + </parameter> + <parameter> + <name>stability</name> + <description>Stable</description> + </parameter> + <parameter> + <name>include</name> + <description>meep/app.h</description> + </parameter> + <parameter> + <name>image</name> + <description>application.png</description> + </parameter> + </parameters> + <description>The application class handles ...</description> + </docblock> + <messages> + <message>4: Warning: Test: '@short_description' parameter unexpected at this location: + * @short_description: the application class + ^</message> + <message>5: Warning: Test: '@title' parameter unexpected at this location: + * @title: Meep application + ^</message> + <message>6: Warning: Test: '@section_id' parameter unexpected at this location: + * @section_id: + ^</message> + <message>7: Warning: Test: '@see_also' parameter unexpected at this location: + * @see_also: #MeepSettings + ^</message> + <message>8: Warning: Test: '@stability' parameter unexpected at this location: + * @stability: Stable + ^</message> + <message>9: Warning: Test: '@include' parameter unexpected at this location: + * @include: meep/app.h + ^</message> + <message>10: Warning: Test: '@image' parameter unexpected at this location: + * @image: application.png + ^</message> + </messages> + </parser> +</test> + +<test> + <!-- + Broken comment block with description part before parameters part, without empty line. + --> + <input>/** + * SECTION:meepapp + * + * The application class handles ... + * @short_description: the application class + * @title: Meep application + * @section_id: + * @see_also: #MeepSettings + * @stability: Stable + * @include: meep/app.h + * @image: application.png + */</input> + <parser> + <docblock> + <identifier> + <name>SECTION:meepapp</name> + </identifier> + <parameters> + <parameter> + <name>short_description</name> + <description>the application class</description> + </parameter> + <parameter> + <name>title</name> + <description>Meep application</description> + </parameter> + <parameter> + <name>section_id</name> + </parameter> + <parameter> + <name>see_also</name> + <description>#MeepSettings</description> + </parameter> + <parameter> + <name>stability</name> + <description>Stable</description> + </parameter> + <parameter> + <name>include</name> + <description>meep/app.h</description> + </parameter> + <parameter> + <name>image</name> + <description>application.png</description> + </parameter> + </parameters> + <description>The application class handles ...</description> + </docblock> + <messages> + <message>5: Warning: Test: '@short_description' parameter unexpected at this location: + * @short_description: the application class + ^</message> + <message>6: Warning: Test: '@title' parameter unexpected at this location: + * @title: Meep application + ^</message> + <message>7: Warning: Test: '@section_id' parameter unexpected at this location: + * @section_id: + ^</message> + <message>8: Warning: Test: '@see_also' parameter unexpected at this location: + * @see_also: #MeepSettings + ^</message> + <message>9: Warning: Test: '@stability' parameter unexpected at this location: + * @stability: Stable + ^</message> + <message>10: Warning: Test: '@include' parameter unexpected at this location: + * @include: meep/app.h + ^</message> + <message>11: Warning: Test: '@image' parameter unexpected at this location: + * @image: application.png + ^</message> + </messages> + </parser> +</test> + +<test> + <!-- + Broken comment block with description part before parameters part, with empty line. + --> + <input>/** + * SECTION:meepapp + * + * The application class handles ... + * + * @short_description: the application class + * @title: Meep application + * @section_id: + * @see_also: #MeepSettings + * @stability: Stable + * @include: meep/app.h + * @image: application.png + */</input> + <parser> + <docblock> + <identifier> + <name>SECTION:meepapp</name> + </identifier> + <parameters> + <parameter> + <name>short_description</name> + <description>the application class</description> + </parameter> + <parameter> + <name>title</name> + <description>Meep application</description> + </parameter> + <parameter> + <name>section_id</name> + </parameter> + <parameter> + <name>see_also</name> + <description>#MeepSettings</description> + </parameter> + <parameter> + <name>stability</name> + <description>Stable</description> + </parameter> + <parameter> + <name>include</name> + <description>meep/app.h</description> + </parameter> + <parameter> + <name>image</name> + <description>application.png</description> + </parameter> + </parameters> + <description>The application class handles ...</description> + </docblock> + <messages> + <message>6: Warning: Test: '@short_description' parameter unexpected at this location: + * @short_description: the application class + ^</message> + <message>7: Warning: Test: '@title' parameter unexpected at this location: + * @title: Meep application + ^</message> + <message>8: Warning: Test: '@section_id' parameter unexpected at this location: + * @section_id: + ^</message> + <message>9: Warning: Test: '@see_also' parameter unexpected at this location: + * @see_also: #MeepSettings + ^</message> + <message>10: Warning: Test: '@stability' parameter unexpected at this location: + * @stability: Stable + ^</message> + <message>11: Warning: Test: '@include' parameter unexpected at this location: + * @include: meep/app.h + ^</message> + <message>12: Warning: Test: '@image' parameter unexpected at this location: + * @image: application.png + ^</message> + </messages> + </parser> +</test> + +<test> + <!-- + Old style implicit returns. + https://bugzilla.gnome.org/show_bug.cgi?id=457077 + --> + <input>/** + * 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. + */</input> + <parser> + <docblock> + <identifier> + <name>SECTION:tester</name> + </identifier> + <parameters> + <parameter> + <name>short_description</name> + <description>module for gtk-doc unit test</description> + </parameter> + </parameters> + <description>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.</description> + </docblock> + </parser> +</test> + +</tests> |