[vala/0.48] tests/girwriter: Add tests for async methods attributed with NoWrapper
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] tests/girwriter: Add tests for async methods attributed with NoWrapper
- Date: Sun, 28 Feb 2021 17:26:26 +0000 (UTC)
commit d53847b44caa9cc6cefb544eb9ac8daa91ebbf2d
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Jan 31 13:10:39 2021 +0100
tests/girwriter: Add tests for async methods attributed with NoWrapper
tests/girwriter/GirTest-1.0.gir-expected | 186 +++++++++++++++++++++++++++++++
tests/girwriter/girtest.vala | 10 ++
tests/girwriter/girtest.vapi-expected | 6 +
tests/girwriter/girtest.vapigen-expected | 6 +
4 files changed, 208 insertions(+)
---
diff --git a/tests/girwriter/GirTest-1.0.gir-expected b/tests/girwriter/GirTest-1.0.gir-expected
index d26c34291..43142baf0 100644
--- a/tests/girwriter/GirTest-1.0.gir-expected
+++ b/tests/girwriter/GirTest-1.0.gir-expected
@@ -819,6 +819,35 @@
</instance-parameter>
</parameters>
</virtual-method>
+ <virtual-method name="no_wrapper_method_async">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <instance-parameter name="self" transfer-ownership="none">
+ <type name="GirTest.ObjectTest" c:type="GirTestObjectTest*"/>
+ </instance-parameter>
+ <parameter name="_callback_" transfer-ownership="none" allow-none="1"
closure="1" scope="async">
+ <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
+ </parameter>
+ <parameter name="_callback__target" transfer-ownership="none" allow-none="1">
+ <type name="gpointer" c:type="void*"/>
+ </parameter>
+ </parameters>
+ </virtual-method>
+ <virtual-method name="no_wrapper_method_finish">
+ <return-value transfer-ownership="full">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <instance-parameter name="self" transfer-ownership="none">
+ <type name="GirTest.ObjectTest" c:type="GirTestObjectTest*"/>
+ </instance-parameter>
+ <parameter name="_res_" transfer-ownership="none">
+ <type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
+ </parameter>
+ </parameters>
+ </virtual-method>
<property name="some-property" writable="1" construct="1">
<type name="utf8" c:type="gchar*"/>
</property>
@@ -1036,6 +1065,39 @@
</parameters>
</callback>
</field>
+ <field name="no_wrapper_method_async">
+ <callback name="no_wrapper_method_async" c:type="no_wrapper_method_async">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <instance-parameter name="self" transfer-ownership="none">
+ <type name="GirTest.ObjectTest" c:type="GirTestObjectTest*"/>
+ </instance-parameter>
+ <parameter name="_callback_" transfer-ownership="none" allow-none="1"
closure="1" scope="async">
+ <type name="Gio.AsyncReadyCallback"
c:type="GAsyncReadyCallback"/>
+ </parameter>
+ <parameter name="_callback__target" transfer-ownership="none"
allow-none="1">
+ <type name="gpointer" c:type="void*"/>
+ </parameter>
+ </parameters>
+ </callback>
+ </field>
+ <field name="no_wrapper_method_finish">
+ <callback name="no_wrapper_method_finish" c:type="no_wrapper_method_finish">
+ <return-value transfer-ownership="full">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <instance-parameter name="self" transfer-ownership="none">
+ <type name="GirTest.ObjectTest" c:type="GirTestObjectTest*"/>
+ </instance-parameter>
+ <parameter name="_res_" transfer-ownership="none">
+ <type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
+ </parameter>
+ </parameters>
+ </callback>
+ </field>
<field name="signal_with_default_handlder">
<callback name="object_test_signal_with_default_handlder"
c:type="object_test_signal_with_default_handlder">
<return-value transfer-ownership="full">
@@ -1264,6 +1326,35 @@
</instance-parameter>
</parameters>
</virtual-method>
+ <virtual-method name="no_wrapper_method_async">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <instance-parameter name="self" transfer-ownership="none">
+ <type name="GirTest.AbstractObjectTest"
c:type="GirTestAbstractObjectTest*"/>
+ </instance-parameter>
+ <parameter name="_callback_" transfer-ownership="none" allow-none="1"
closure="1" scope="async">
+ <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
+ </parameter>
+ <parameter name="_callback__target" transfer-ownership="none" allow-none="1">
+ <type name="gpointer" c:type="void*"/>
+ </parameter>
+ </parameters>
+ </virtual-method>
+ <virtual-method name="no_wrapper_method_finish">
+ <return-value transfer-ownership="full">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <instance-parameter name="self" transfer-ownership="none">
+ <type name="GirTest.AbstractObjectTest"
c:type="GirTestAbstractObjectTest*"/>
+ </instance-parameter>
+ <parameter name="_res_" transfer-ownership="none">
+ <type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
+ </parameter>
+ </parameters>
+ </virtual-method>
</class>
<record name="AbstractObjectTestClass" c:type="GirTestAbstractObjectTestClass"
glib:is-gtype-struct-for="AbstractObjectTest">
<field name="parent_class" readable="0" private="1">
@@ -1392,6 +1483,39 @@
</parameters>
</callback>
</field>
+ <field name="no_wrapper_method_async">
+ <callback name="no_wrapper_method_async" c:type="no_wrapper_method_async">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <instance-parameter name="self" transfer-ownership="none">
+ <type name="GirTest.AbstractObjectTest"
c:type="GirTestAbstractObjectTest*"/>
+ </instance-parameter>
+ <parameter name="_callback_" transfer-ownership="none" allow-none="1"
closure="1" scope="async">
+ <type name="Gio.AsyncReadyCallback"
c:type="GAsyncReadyCallback"/>
+ </parameter>
+ <parameter name="_callback__target" transfer-ownership="none"
allow-none="1">
+ <type name="gpointer" c:type="void*"/>
+ </parameter>
+ </parameters>
+ </callback>
+ </field>
+ <field name="no_wrapper_method_finish">
+ <callback name="no_wrapper_method_finish" c:type="no_wrapper_method_finish">
+ <return-value transfer-ownership="full">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <instance-parameter name="self" transfer-ownership="none">
+ <type name="GirTest.AbstractObjectTest"
c:type="GirTestAbstractObjectTest*"/>
+ </instance-parameter>
+ <parameter name="_res_" transfer-ownership="none">
+ <type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
+ </parameter>
+ </parameters>
+ </callback>
+ </field>
</record>
<record name="AbstractObjectTestPrivate" c:type="GirTestAbstractObjectTestPrivate" disguised="1"/>
<class name="ImplementionTest" c:type="GirTestImplementionTest" c:symbol-prefix="implemention_test"
glib:type-name="GirTestImplementionTest" glib:get-type="gir_test_implemention_test_get_type"
glib:type-struct="ImplementionTestClass" parent="GObject.Object">
@@ -1860,6 +1984,35 @@
</instance-parameter>
</parameters>
</virtual-method>
+ <virtual-method name="no_wrapper_method_async">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <instance-parameter name="self" transfer-ownership="none">
+ <type name="GirTest.InterfaceTest" c:type="GirTestInterfaceTest*"/>
+ </instance-parameter>
+ <parameter name="_callback_" transfer-ownership="none" allow-none="1"
closure="1" scope="async">
+ <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
+ </parameter>
+ <parameter name="_callback__target" transfer-ownership="none" allow-none="1">
+ <type name="gpointer" c:type="void*"/>
+ </parameter>
+ </parameters>
+ </virtual-method>
+ <virtual-method name="no_wrapper_method_finish">
+ <return-value transfer-ownership="full">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <instance-parameter name="self" transfer-ownership="none">
+ <type name="GirTest.InterfaceTest" c:type="GirTestInterfaceTest*"/>
+ </instance-parameter>
+ <parameter name="_res_" transfer-ownership="none">
+ <type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
+ </parameter>
+ </parameters>
+ </virtual-method>
<property name="property" writable="1" construct="1">
<type name="gint" c:type="gint"/>
</property>
@@ -2028,6 +2181,39 @@
</parameters>
</callback>
</field>
+ <field name="no_wrapper_method_async">
+ <callback name="no_wrapper_method_async" c:type="no_wrapper_method_async">
+ <return-value transfer-ownership="none">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <instance-parameter name="self" transfer-ownership="none">
+ <type name="GirTest.InterfaceTest"
c:type="GirTestInterfaceTest*"/>
+ </instance-parameter>
+ <parameter name="_callback_" transfer-ownership="none" allow-none="1"
closure="1" scope="async">
+ <type name="Gio.AsyncReadyCallback"
c:type="GAsyncReadyCallback"/>
+ </parameter>
+ <parameter name="_callback__target" transfer-ownership="none"
allow-none="1">
+ <type name="gpointer" c:type="void*"/>
+ </parameter>
+ </parameters>
+ </callback>
+ </field>
+ <field name="no_wrapper_method_finish">
+ <callback name="no_wrapper_method_finish" c:type="no_wrapper_method_finish">
+ <return-value transfer-ownership="full">
+ <type name="none" c:type="void"/>
+ </return-value>
+ <parameters>
+ <instance-parameter name="self" transfer-ownership="none">
+ <type name="GirTest.InterfaceTest"
c:type="GirTestInterfaceTest*"/>
+ </instance-parameter>
+ <parameter name="_res_" transfer-ownership="none">
+ <type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
+ </parameter>
+ </parameters>
+ </callback>
+ </field>
<field name="get_property">
<callback name="get_property" c:type="get_property">
<return-value transfer-ownership="none">
diff --git a/tests/girwriter/girtest.vala b/tests/girwriter/girtest.vala
index 698fa4821..c6c5c6dc5 100644
--- a/tests/girwriter/girtest.vala
+++ b/tests/girwriter/girtest.vala
@@ -79,6 +79,9 @@ namespace GirTest {
[NoWrapper]
public virtual void no_wrapper_method () {
}
+ [NoWrapper]
+ public virtual async void no_wrapper_method_async () {
+ }
}
[GIR (visible = false)]
@@ -273,6 +276,10 @@ namespace GirTest {
[NoWrapper]
public virtual void no_wrapper_method () {
}
+
+ [NoWrapper]
+ public virtual async void no_wrapper_method_async () {
+ }
}
public abstract class AbstractObjectTest : Object {
@@ -291,6 +298,9 @@ namespace GirTest {
[NoWrapper]
public abstract void no_wrapper_method ();
+
+ [NoWrapper]
+ public abstract async void no_wrapper_method_async ();
}
public interface PrerequisiteTest : InterfaceTest {
diff --git a/tests/girwriter/girtest.vapi-expected b/tests/girwriter/girtest.vapi-expected
index 0ea4a374e..a5654e7cc 100644
--- a/tests/girwriter/girtest.vapi-expected
+++ b/tests/girwriter/girtest.vapi-expected
@@ -14,6 +14,8 @@ namespace GirTest {
public abstract void method_valist (int param, va_list vargs);
[NoWrapper]
public abstract void no_wrapper_method ();
+ [NoWrapper]
+ public abstract async void no_wrapper_method_async ();
[GIR (visible = false)]
public abstract async void skipped_coroutine_method (int param);
}
@@ -80,6 +82,8 @@ namespace GirTest {
public ObjectTest.newv (int param, ...);
[NoWrapper]
public virtual void no_wrapper_method ();
+ [NoWrapper]
+ public virtual async void no_wrapper_method_async ();
public void none_in ();
public static void none_inout (ref unowned GirTest.ObjectTest obj);
public static void none_out (out unowned GirTest.ObjectTest obj);
@@ -125,6 +129,8 @@ namespace GirTest {
public virtual void method_valist (int param, va_list vargs);
[NoWrapper]
public virtual void no_wrapper_method ();
+ [NoWrapper]
+ public virtual async void no_wrapper_method_async ();
[GIR (visible = false)]
public virtual async void skipped_coroutine_method (int param);
public abstract int property { get; set construct; }
diff --git a/tests/girwriter/girtest.vapigen-expected b/tests/girwriter/girtest.vapigen-expected
index 465f37e3b..2da95ed1a 100644
--- a/tests/girwriter/girtest.vapigen-expected
+++ b/tests/girwriter/girtest.vapigen-expected
@@ -15,6 +15,8 @@ namespace GirTest {
public abstract void method_valist (int param, va_list vargs);
[NoWrapper]
public abstract void no_wrapper_method ();
+ [NoWrapper]
+ public abstract async void no_wrapper_method_async ();
}
[CCode (cheader_filename = "girtest.h", has_type_id = false)]
[Compact]
@@ -105,6 +107,8 @@ namespace GirTest {
public virtual void method_with_default_impl (int8 param);
[NoWrapper]
public virtual void no_wrapper_method ();
+ [NoWrapper]
+ public virtual async void no_wrapper_method_async ();
public void none_in ();
public static void none_inout (ref unowned GirTest.ObjectTest obj);
public static void none_out (out unowned GirTest.ObjectTest obj);
@@ -151,6 +155,8 @@ namespace GirTest {
public virtual void int8_in (int8 param);
[NoWrapper]
public virtual void no_wrapper_method ();
+ [NoWrapper]
+ public virtual async void no_wrapper_method_async ();
public virtual void set_property (int value);
public abstract int property { get; set construct; }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]