summaryrefslogtreecommitdiff
path: root/tests/scanner/annotationparser/gi/annotation_allow_none.xml
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2012-07-04 11:58:13 +0200
committerDieter Verfaillie <dieterv@optionexplicit.be>2012-11-28 21:31:23 +0100
commitaf2e146f5f24b93322ad0112d37a8e41222c3085 (patch)
treeaa0e94914de51582e19ec7566cd5b40c88475e87 /tests/scanner/annotationparser/gi/annotation_allow_none.xml
parentc9516551d29432270f5f840ef315ce34f654a62f (diff)
downloadgobject-introspection-af2e146f5f24b93322ad0112d37a8e41222c3085.tar.gz
giscanner: add AnnotationParser tests
The tests in giscanner/annotationpatters.py only test the regular expression programs used when parsing GTK-Doc comment blocks but do not test the structure of the resulting "parse tree". This patch adds 193 GTK-Doc comment blocks and the expected results AnnotationParser should return (with it's current level of understanding of GTK-Doc comment block syntax). These are compared by tests/scanner/annotationparser/test_parser.py which complains with a diff on failure. https://bugzilla.gnome.org/show_bug.cgi?id=688897
Diffstat (limited to 'tests/scanner/annotationparser/gi/annotation_allow_none.xml')
-rw-r--r--tests/scanner/annotationparser/gi/annotation_allow_none.xml47
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/scanner/annotationparser/gi/annotation_allow_none.xml b/tests/scanner/annotationparser/gi/annotation_allow_none.xml
new file mode 100644
index 00000000..02db79a9
--- /dev/null
+++ b/tests/scanner/annotationparser/gi/annotation_allow_none.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<tests>
+
+<test>
+ <commentblock>/**
+ * annotation_object_inout:
+ * @object: a #GObject
+ * @inoutarg: (inout) (allow-none): This is an argument test
+ *
+ * This is a test for out arguments
+ *
+ * Return value: an int
+ */</commentblock>
+ <docblock>
+ <identifier>
+ <name>annotation_object_inout</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>a #GObject</description>
+ </parameter>
+ <parameter>
+ <name>inoutarg</name>
+ <annotations>
+ <annotation>
+ <name>inout</name>
+ </annotation>
+ <annotation>
+ <name>allow-none</name>
+ </annotation>
+ </annotations>
+ <description>This is an argument test</description>
+ </parameter>
+ </parameters>
+ <description>This is a test for out arguments</description>
+ <tags>
+ <tag>
+ <name>returns</name>
+ <description>an int</description>
+ </tag>
+ </tags>
+ </docblock>
+</test>
+
+</tests>