[gobject-introspection] tests: add missing fixed-size array annotation tests



commit 99f0da21ceea270ab272bb0e1e22ad973ae44de0
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date:   Fri Jun 26 07:27:25 2015 +0200

    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

 .../annotationparser/gi/annotation_array.xml       |   55 ++++++++++++++++++++
 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 8b7a62d..63e30e1 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): ...


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]