summaryrefslogtreecommitdiff
path: root/tests/scanner/annotationparser/gi/tag.xml
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2013-08-13 15:01:00 +0200
committerDieter Verfaillie <dieterv@optionexplicit.be>2013-10-08 20:56:39 +0200
commit4b690b187bf8d0b7b571faaa050986b796e797a4 (patch)
tree05cfc910d4c9e276aa93255d4e4812b897dd25e3 /tests/scanner/annotationparser/gi/tag.xml
parent0af20939c8e2deaf1d1f06e069594d53acf65d2f (diff)
downloadgobject-introspection-4b690b187bf8d0b7b571faaa050986b796e797a4.tar.gz
giscanner: add missing tests
Diffstat (limited to 'tests/scanner/annotationparser/gi/tag.xml')
-rw-r--r--tests/scanner/annotationparser/gi/tag.xml269
1 files changed, 269 insertions, 0 deletions
diff --git a/tests/scanner/annotationparser/gi/tag.xml b/tests/scanner/annotationparser/gi/tag.xml
index d116841c..c91ec0f0 100644
--- a/tests/scanner/annotationparser/gi/tag.xml
+++ b/tests/scanner/annotationparser/gi/tag.xml
@@ -4,6 +4,151 @@
<test>
<input>/**
+ * test_tag_missing_colon:
+ *
+ * Forgotten colon below will result in a warning.
+ *
+ * Returns: (allow-none) return value
+ **/</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>test_tag_missing_colon</name>
+ </identifier>
+ <description>Forgotten colon below will result in a warning.</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <annotations>
+ <annotation>
+ <name>allow-none</name>
+ </annotation>
+ </annotations>
+ <description>return value</description>
+ </tag>
+ </tags>
+ </docblock>
+ <messages>
+ <message>6: Warning: Test: missing ":" at column 25:
+ * Returns: (allow-none) return value
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
+<test>
+ <input>/**
+ * test_unexpected_tag:
+ *
+ * @param1: first parameter
+ * does something
+ * Returns: something
+ * returning something
+ *
+ * Probably intended as the comment block description part but in reality belongs to
+ * the "Returns:"" tag description field.
+ **/</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>test_unexpected_tag</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>param1</name>
+ <description>first parameter
+does something</description>
+ </parameter>
+ </parameters>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>something
+returning something
+
+Probably intended as the comment block description part but in reality belongs to
+the "Returns:"" tag description field.</description>
+ </tag>
+ </tags>
+ </docblock>
+ <messages>
+ <message>4: Warning: Test: "@param1" parameter unexpected at this location:
+ * @param1: first parameter
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
+<test>
+ <input>/**
+ * test_unknown_tag:
+ *
+ * Foo: something
+ *
+ * Returns: True
+ * Moo: anything
+ **/</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>test_unknown_tag</name>
+ </identifier>
+ <description>Foo: something</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>True
+Moo: anything</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * test_unknown_tag:
+ *
+ * Foo: something
+ *
+ * Returns: True
+ * Moo: anything
+ */</output>
+</test>
+
+<test>
+ <input>/**
+ * test_multiline_tag:
+ *
+ * Returns:
+ * True
+ * Since:
+ * 1.0: yeah
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>test_multiline_tag</name>
+ </identifier>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>True</description>
+ </tag>
+ <tag>
+ <name>since</name>
+ <description>1.0: yeah</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * test_multiline_tag:
+ *
+ * Returns: True
+ * Since: 1.0: yeah
+ */</output>
+</test>
+
+<test>
+ <input>/**
* test_multiline_annotations_on_tag:
*
* Annotations spanning multiple lines are not valid
@@ -69,4 +214,128 @@
</parser>
</test>
+<test>
+ <input>/**
+ * gdk_device_list_axes:
+ * @device: a pointer #GdkDevice
+ *
+ * Returns a #GList of #GdkAtom<!-- -->s, containing the labels for
+ * the axes that @device currently has.
+ *
+ * Returns: (transfer container) (element-type GdkAtom):
+ * A #GList of #GdkAtom<!-- -->s, free
+ * with g_list_free().
+ *
+ * Since: 3.0
+ **/</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>gdk_device_list_axes</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>device</name>
+ <description>a pointer #GdkDevice</description>
+ </parameter>
+ </parameters>
+ <description>Returns a #GList of #GdkAtom<!-- -->s, containing the labels for
+the axes that @device currently has.</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <annotations>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>container</name>
+ </option>
+ </options>
+ </annotation>
+ <annotation>
+ <name>element-type</name>
+ <options>
+ <option>
+ <name>GdkAtom</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>
+ A #GList of #GdkAtom<!-- -->s, free
+ with g_list_free().</description>
+ </tag>
+ <tag>
+ <name>since</name>
+ <value>3.0</value>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+</test>
+
+<test>
+ <input>/**
+ * FsSession:codec-preferences:
+ *
+ * Type: GLib.List(FsCodec)
+ * Transfer: full
+ *
+ * This is the current preferences list for the local codecs. It is
+ * set by the user to specify the codec options and priorities. The user may
+ * change its value with fs_session_set_codec_preferences() at any time
+ * during a session. It is a #GList of #FsCodec.
+ * The user must free this codec list using fs_codec_list_destroy() when done.
+ *
+ * The payload type may be a valid dynamic PT (96-127), %FS_CODEC_ID_DISABLE
+ * or %FS_CODEC_ID_ANY. If the encoding name is "reserve-pt", then the
+ * payload type of the codec will be "reserved" and not be used by any
+ * dynamically assigned payload type.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>FsSession:codec-preferences</name>
+ <annotations>
+ <annotation>
+ <name>type</name>
+ <options>
+ <option>
+ <name>GLib.List(FsCodec)</name>
+ </option>
+ </options>
+ </annotation>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>full</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>This is the current preferences list for the local codecs. It is
+set by the user to specify the codec options and priorities. The user may
+change its value with fs_session_set_codec_preferences() at any time
+during a session. It is a #GList of #FsCodec.
+The user must free this codec list using fs_codec_list_destroy() when done.
+
+The payload type may be a valid dynamic PT (96-127), %FS_CODEC_ID_DISABLE
+or %FS_CODEC_ID_ANY. If the encoding name is "reserve-pt", then the
+payload type of the codec will be "reserved" and not be used by any
+dynamically assigned payload type.</description>
+ </docblock>
+ <messages>
+ <message>4: Warning: Test: GObject-Introspection specific GTK-Doc tag "Type" has been deprecated, please use annotations on the identifier instead:
+ * Type: GLib.List(FsCodec)
+ ^</message>
+ <message>5: Warning: Test: GObject-Introspection specific GTK-Doc tag "Transfer" has been deprecated, please use annotations on the identifier instead:
+ * Transfer: full
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
</tests>