summaryrefslogtreecommitdiff
path: root/tests/scanner/annotationparser/gi/syntax_identifier.xml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scanner/annotationparser/gi/syntax_identifier.xml')
-rw-r--r--tests/scanner/annotationparser/gi/syntax_identifier.xml304
1 files changed, 304 insertions, 0 deletions
diff --git a/tests/scanner/annotationparser/gi/syntax_identifier.xml b/tests/scanner/annotationparser/gi/syntax_identifier.xml
new file mode 100644
index 00000000..69dcf328
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/syntax_identifier.xml
@@ -0,0 +1,304 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <!--
+ Identifier part not on the first line.
+ -->
+ <commentblock>/**
+*
+* SECTION:meepapp
+*/</commentblock>
+</test>
+
+<test>
+ <!--
+ Multiple identifier parts
+ -->
+ <commentblock>/**
+ * SECTION:meepapp
+ * SECTION:meepapp2
+ * @short_description: the application class
+ *
+ * The application class handles ...
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>SECTION:meepapp</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>short_description</name>
+ <description>the application class</description>
+ </parameter>
+ </parameters>
+ <description>SECTION:meepapp2
+The application class handles ...</description>
+ </docblock>
+</test>
+
+<test>
+ <!--
+ Section documentation including all optional metadata.
+ -->
+ <commentblock>/**
+ * 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 ...
+ */</commentblock>
+ <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>
+</test>
+
+<test>
+ <!--
+ Broken comment block with empty line between identifier and parameters parts.
+ -->
+ <commentblock>/**
+ * 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 ...
+ */</commentblock>
+ <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>
+</test>
+
+<test>
+ <!--
+ Broken comment block with description part before parameters part, without empty line.
+ -->
+ <commentblock>/**
+ * 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
+ */</commentblock>
+ <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>
+</test>
+
+<test>
+ <!--
+ Broken comment block with description part before parameters part, with empty line.
+ -->
+ <commentblock>/**
+ * 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
+ */</commentblock>
+ <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>
+</test>
+
+<test>
+ <!--
+ Old style implicit returns.
+ https://bugzilla.gnome.org/show_bug.cgi?id=457077
+ -->
+ <commentblock>/**
+ * 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.
+ */</commentblock>
+ <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>
+</test>
+
+<test>
+ <!--
+ Invalid identifier
+ -->
+ <commentblock>/**
+ * gnm_cell_set_expr_and_value: Stores (WITHOUT COPYING) the supplied value, and
+ * references the supplied expression and links it into the expression
+ * list. It marks the sheet as dirty. It is intended for use by import
+ * routines or operations that do bulk assignment.
+ *
+ * WARNING : This is an internal routine that does not queue redraws,
+ * does not auto-resize, does not calculate spans, and does
+ * not render the value.
+ *
+ * NOTE : This DOES check for array partitioning.
+ */</commentblock>
+</test>
+
+</tests>