summaryrefslogtreecommitdiff
path: root/tests/scanner/annotationparser/gi/annotation_not_nullable.xml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scanner/annotationparser/gi/annotation_not_nullable.xml')
-rw-r--r--tests/scanner/annotationparser/gi/annotation_not_nullable.xml76
1 files changed, 76 insertions, 0 deletions
diff --git a/tests/scanner/annotationparser/gi/annotation_not_nullable.xml b/tests/scanner/annotationparser/gi/annotation_not_nullable.xml
new file mode 100644
index 00000000..d63ec94e
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_not_nullable.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
+
+<test>
+ <input>/**
+ * annotation_object_not_nullable:
+ * @object: a #GObject
+ * @closurearg: (closure) (not nullable): This is an argument test
+ *
+ * This is a test for not-nullable arguments which would otherwise be nullable
+ * by convention.
+ *
+ * Return value: (not nullable): a pointer
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>annotation_object_not_nullable</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>a #GObject</description>
+ </parameter>
+ <parameter>
+ <name>closurearg</name>
+ <annotations>
+ <annotation>
+ <name>closure</name>
+ </annotation>
+ <annotation>
+ <name>not</name>
+ <options>
+ <option>
+ <name>nullable</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>This is an argument test</description>
+ </parameter>
+ </parameters>
+ <description>This is a test for not-nullable arguments which would otherwise be nullable
+by convention.</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <annotations>
+ <annotation>
+ <name>not</name>
+ <options>
+ <option>
+ <name>nullable</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>a pointer</description>
+ </tag>
+ </tags>
+ </docblock>
+ </parser>
+ <output>/**
+ * annotation_object_not_nullable:
+ * @object: a #GObject
+ * @closurearg: (closure) (not nullable): This is an argument test
+ *
+ * This is a test for not-nullable arguments which would otherwise be nullable
+ * by convention.
+ *
+ * Returns: (not nullable): a pointer
+ */</output>
+</test>
+
+</tests>