diff options
author | Dieter Verfaillie <dieterv@optionexplicit.be> | 2013-08-13 15:01:00 +0200 |
---|---|---|
committer | Dieter Verfaillie <dieterv@optionexplicit.be> | 2013-10-08 20:56:39 +0200 |
commit | 4b690b187bf8d0b7b571faaa050986b796e797a4 (patch) | |
tree | 05cfc910d4c9e276aa93255d4e4812b897dd25e3 /tests/scanner/annotationparser/gi/annotation_element_type.xml | |
parent | 0af20939c8e2deaf1d1f06e069594d53acf65d2f (diff) | |
download | gobject-introspection-4b690b187bf8d0b7b571faaa050986b796e797a4.tar.gz |
giscanner: add missing tests
Diffstat (limited to 'tests/scanner/annotationparser/gi/annotation_element_type.xml')
-rw-r--r-- | tests/scanner/annotationparser/gi/annotation_element_type.xml | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/tests/scanner/annotationparser/gi/annotation_element_type.xml b/tests/scanner/annotationparser/gi/annotation_element_type.xml index 84337b7e..2e1f945e 100644 --- a/tests/scanner/annotationparser/gi/annotation_element_type.xml +++ b/tests/scanner/annotationparser/gi/annotation_element_type.xml @@ -5,6 +5,8 @@ <test> <input>/** * foo_test_array: + * @a: (element-type): + * @b: (element-type x y z): * * Returns: (element-type utf8) (transfer container): returns %NULL. */</input> @@ -13,6 +15,35 @@ <identifier> <name>foo_test_array</name> </identifier> + <parameters> + <parameter> + <name>a</name> + <annotations> + <annotation> + <name>element-type</name> + </annotation> + </annotations> + </parameter> + <parameter> + <name>b</name> + <annotations> + <annotation> + <name>element-type</name> + <options> + <option> + <name>x</name> + </option> + <option> + <name>y</name> + </option> + <option> + <name>z</name> + </option> + </options> + </annotation> + </annotations> + </parameter> + </parameters> <tags> <tag> <name>returns</name> @@ -38,6 +69,10 @@ </tag> </tags> </docblock> + <messages> + <message>3: Warning: Test: "element-type" annotation takes at least one option, none given</message> + <message>4: Warning: Test: "element-type" annotation takes at most 2 options, 3 given</message> + </messages> </parser> </test> @@ -129,4 +164,76 @@ element-type annotation.</description> </parser> </test> +<test> + <input> /** + * foo_test_array: + * + * Returns: (element-type invalid utf8=invalid GLib.HashTable(utf8,utf8)): returns %NULL. + */</input> + <parser> + <docblock> + <identifier> + <name>foo_test_array</name> + </identifier> + <tags> + <tag> + <name>returns</name> + <annotations> + <annotation> + <name>element-type</name> + <options> + <option> + <name>invalid utf8=invalid GLib.HashTable(utf8,utf8)</name> + </option> + </options> + </annotation> + </annotations> + <description>returns %NULL.</description> + </tag> + </tags> + </docblock> + <messages> + <message>4: Warning: Test: invalid annotation options: expected a "list" but received "key=value pairs": + * Returns: (element-type invalid utf8=invalid GLib.HashTable(utf8,utf8)): returns %NULL. + ^</message> + </messages> + </parser> +</test> + +<test> + <input> /** + * foo_test_array: + * + * Returns: (element-type utf8=invalid GLib.HashTable(utf8,utf8) invalid): returns %NULL. + */</input> + <parser> + <docblock> + <identifier> + <name>foo_test_array</name> + </identifier> + <tags> + <tag> + <name>returns</name> + <annotations> + <annotation> + <name>element-type</name> + <options> + <option> + <name>utf8=invalid GLib.HashTable(utf8,utf8) invalid</name> + </option> + </options> + </annotation> + </annotations> + <description>returns %NULL.</description> + </tag> + </tags> + </docblock> + <messages> + <message>4: Warning: Test: invalid annotation options: expected a "list" but received "key=value pairs": + * Returns: (element-type utf8=invalid GLib.HashTable(utf8,utf8) invalid): returns %NULL. + ^</message> + </messages> + </parser> +</test> + </tests> |