diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2015-11-06 12:42:11 +0100 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2015-11-06 12:45:04 +0100 |
commit | d8e257464bd93ea502740169887297fa62925a16 (patch) | |
tree | f43cd0266e2413ff5ea85dc1fb9ae523d27f7ab6 /tests/scanner/Regress-1.0-Gjs-expected | |
parent | 54a5ed77c9c1296c7709c80428dc41d535999798 (diff) | |
download | gobject-introspection-d8e257464bd93ea502740169887297fa62925a16.tar.gz |
tests: Add more regression tests for (not nullable)
On bug #719966, the question arose of whether parameters annotated with
(element-type) but not (not nullable) are regarded as nullable or
non-nullable.
Add some new unit tests to Regress-1.0.gir to check the behaviour is as
expected: annotating a parameter with (element-type) implicitly makes it
non-nullable (unless also annotated with (nullable)).
https://bugzilla.gnome.org/show_bug.cgi?id=757678
Diffstat (limited to 'tests/scanner/Regress-1.0-Gjs-expected')
2 files changed, 72 insertions, 0 deletions
diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.not_nullable_element_typed_gpointer_in.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.not_nullable_element_typed_gpointer_in.page new file mode 100644 index 00000000..d14a4ad5 --- /dev/null +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.not_nullable_element_typed_gpointer_in.page @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<page id="Regress.TestObj.not_nullable_element_typed_gpointer_in" + type="topic" + style="method" + xmlns="http://projectmallard.org/1.0/" + xmlns:api="http://projectmallard.org/experimental/api/" + xmlns:ui="http://projectmallard.org/1.0/ui/"> + <info> + <link xref="Regress.TestObj" group="method" type="guide"/> + <api:function> + <api:returns> + <api:type>void</api:type> + </api:returns> + <api:name>regress_test_obj_not_nullable_element_typed_gpointer_in</api:name> + <api:arg> + <api:type>ByteArray</api:type> + <api:name>input</api:name> + </api:arg> + </api:function> + </info> + <title>Regress.TestObj.prototype.not_nullable_element_typed_gpointer_in</title> + <synopsis><code mime="text/x-gjs"> +function not_nullable_element_typed_gpointer_in(input: ByteArray): void { + // Gjs wrapper for regress_test_obj_not_nullable_element_typed_gpointer_in() +} + </code></synopsis> + + +<terms> +<item> +<title><code>input</code></title> + <p>some uint8 array</p> +</item> +</terms> + +</page> diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.not_nullable_typed_gpointer_in.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.not_nullable_typed_gpointer_in.page new file mode 100644 index 00000000..eac06e1b --- /dev/null +++ b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.not_nullable_typed_gpointer_in.page @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<page id="Regress.TestObj.not_nullable_typed_gpointer_in" + type="topic" + style="method" + xmlns="http://projectmallard.org/1.0/" + xmlns:api="http://projectmallard.org/experimental/api/" + xmlns:ui="http://projectmallard.org/1.0/ui/"> + <info> + <link xref="Regress.TestObj" group="method" type="guide"/> + <api:function> + <api:returns> + <api:type>void</api:type> + </api:returns> + <api:name>regress_test_obj_not_nullable_typed_gpointer_in</api:name> + <api:arg> + <api:type>GObject.Object</api:type> + <api:name>input</api:name> + </api:arg> + </api:function> + </info> + <title>Regress.TestObj.prototype.not_nullable_typed_gpointer_in</title> + <synopsis><code mime="text/x-gjs"> +function not_nullable_typed_gpointer_in(input: <link href="../GObject-2.0/GObject.Object.html">GObject.Object</link>): void { + // Gjs wrapper for regress_test_obj_not_nullable_typed_gpointer_in() +} + </code></synopsis> + + +<terms> +<item> +<title><code>input</code></title> + <p>some <link href="../GObject-2.0/GObject.Object.html">GObject.Object</link></p> +</item> +</terms> + +</page> |