summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2015-06-26 07:27:25 +0200
committerDieter Verfaillie <dieterv@optionexplicit.be>2015-06-29 16:59:36 +0200
commit99f0da21ceea270ab272bb0e1e22ad973ae44de0 (patch)
tree3cfc91d487e96b15a4161e424061d6844db7aa23
parent2896dc4083accd92c4b80ef4d9972c2e2009bda2 (diff)
downloadgobject-introspection-99f0da21ceea270ab272bb0e1e22ad973ae44de0.tar.gz
tests: add missing fixed-size array annotation tests
Cases where fixed-size has no value and fixed-size has a non-integer value where not yet tested. Found thanks to coverage.py
-rw-r--r--tests/scanner/annotationparser/gi/annotation_array.xml55
1 files changed, 55 insertions, 0 deletions
diff --git a/tests/scanner/annotationparser/gi/annotation_array.xml b/tests/scanner/annotationparser/gi/annotation_array.xml
index 8b7a62df..63e30e18 100644
--- a/tests/scanner/annotationparser/gi/annotation_array.xml
+++ b/tests/scanner/annotationparser/gi/annotation_array.xml
@@ -405,6 +405,61 @@ are zero-terminated</description>
<test>
<input>/**
+ * annotation_array_fixed_size:
+ * @data1: (array fixed-size): a value
+ * @data2: (array fixed-size=a): a value
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>annotation_array_fixed_size</name>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>data1</name>
+ <annotations>
+ <annotation>
+ <name>array</name>
+ <options>
+ <option>
+ <name>fixed-size</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>a value</description>
+ </parameter>
+ <parameter>
+ <name>data2</name>
+ <annotations>
+ <annotation>
+ <name>array</name>
+ <options>
+ <option>
+ <name>fixed-size</name>
+ <value>a</value>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ <description>a value</description>
+ </parameter>
+ </parameters>
+ </docblock>
+ <messages>
+ <message>3: Warning: Test: "array" annotation option "fixed-size" needs a value</message>
+ <message>4: Warning: Test: invalid "array" annotation option "fixed-size" value "a", must be an integer</message>
+ </messages>
+ </parser>
+ <output>/**
+ * annotation_array_fixed_size:
+ * @data1: (array fixed-size): a value
+ * @data2: (array fixed-size=a): a value
+ */</output>
+</test>
+
+<test>
+ <input>/**
* g_app_launch_context_get_environment:
* @arg1: (array zero-terminated): ...
* @arg2: (array length): ...