summaryrefslogtreecommitdiff
path: root/tests/scanner/Regress-1.0-Python-expected
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2019-08-01 13:37:47 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2019-08-01 22:12:52 -0700
commit99db7d7fb3dbb9f4da416a21282aadf351eb3471 (patch)
tree9de6f70136b2f8dcb98a97b492a6b9d75b2f342a /tests/scanner/Regress-1.0-Python-expected
parent3bdb82991f2767a2d43a8ee15251e48e46e82c3c (diff)
downloadgobject-introspection-99db7d7fb3dbb9f4da416a21282aadf351eb3471.tar.gz
regress: Add regression test for signal with GError param
This exercises the little-used code path where a signal is emitted with a nullable GError as a parameter. It's modeled after GstPbutils.Discoverer's 'discovered' signal. See GNOME/gjs#262.
Diffstat (limited to 'tests/scanner/Regress-1.0-Python-expected')
-rw-r--r--tests/scanner/Regress-1.0-Python-expected/Regress.TestObj-sig-with-gerror.page40
-rw-r--r--tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.emit_sig_with_error.page37
-rw-r--r--tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.emit_sig_with_null_error.page37
3 files changed, 114 insertions, 0 deletions
diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj-sig-with-gerror.page b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj-sig-with-gerror.page
new file mode 100644
index 00000000..9e0cd6e4
--- /dev/null
+++ b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj-sig-with-gerror.page
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<page id="Regress.TestObj-sig-with-gerror"
+ type="topic"
+ style="signal"
+ 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="signal" type="guide"/>
+ <title type="link" role="topic">sig-with-gerror</title>
+ </info>
+ <title>Regress.TestObj::sig-with-gerror</title>
+ <synopsis><code mime="text/x-python">
+def callback(test_obj, error, user_param1, ...)
+ </code></synopsis>
+ <p>This signal is modeled after #GstDiscoverer::discovered, and is added to
+exercise the path of a <link href="../GLib-2.0/GLib.Error.html">GLib.Error</link> being marshalled as a boxed type instead of
+an exception in the introspected language.</p> <p>Use via <link xref="Regress.TestObj.emit_sig_with_error"/> and
+<link xref="Regress.TestObj.emit_sig_with_null_error"/>, or emit via the introspected
+language.</p>
+
+<terms>
+<item>
+<title><code>test_obj</code></title>
+<p>instance of <link xref="Regress.TestObj"/> that is emitting the signal</p>
+</item>
+<item>
+<title><code>error</code></title>
+ <p>A <link href="../GLib-2.0/GLib.Error.html">GLib.Error</link> if something went wrong
+ internally in @self. You must not free this <link href="../GLib-2.0/GLib.Error.html">GLib.Error</link>.</p>
+</item>
+<title><code>user_param1</code></title>
+<p>first user parameter (if any) specified with the connect() method</p>
+<item>
+<title><code>...</code></title>
+<p>additional user parameters (if any)</p>
+</item>
+</terms>
+
+</page>
diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.emit_sig_with_error.page b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.emit_sig_with_error.page
new file mode 100644
index 00000000..de973b13
--- /dev/null
+++ b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.emit_sig_with_error.page
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<page id="Regress.TestObj.emit_sig_with_error"
+ 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>none</api:type>
+ </api:returns>
+ <api:name>regress_test_obj_emit_sig_with_error</api:name>
+ <api:arg>
+ <api:type>Regress.TestObj</api:type>
+ <api:name>self</api:name>
+ </api:arg>
+ </api:function>
+ </info>
+ <title>Regress.TestObj.emit_sig_with_error</title>
+ <synopsis><code mime="text/x-python">
+@accepts(Regress.TestObj)
+@returns(none)
+def emit_sig_with_error(self):
+ # Python wrapper for regress_test_obj_emit_sig_with_error()
+ </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>self</code></title>
+ <p>The object to emit the signal.</p>
+</item>
+</terms>
+
+</page>
diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.emit_sig_with_null_error.page b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.emit_sig_with_null_error.page
new file mode 100644
index 00000000..4ced2eb6
--- /dev/null
+++ b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.emit_sig_with_null_error.page
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<page id="Regress.TestObj.emit_sig_with_null_error"
+ 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>none</api:type>
+ </api:returns>
+ <api:name>regress_test_obj_emit_sig_with_null_error</api:name>
+ <api:arg>
+ <api:type>Regress.TestObj</api:type>
+ <api:name>self</api:name>
+ </api:arg>
+ </api:function>
+ </info>
+ <title>Regress.TestObj.emit_sig_with_null_error</title>
+ <synopsis><code mime="text/x-python">
+@accepts(Regress.TestObj)
+@returns(none)
+def emit_sig_with_null_error(self):
+ # Python wrapper for regress_test_obj_emit_sig_with_null_error()
+ </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>self</code></title>
+ <p>The object to emit the signal.</p>
+</item>
+</terms>
+
+</page>