[vala/0.50] 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.50] tests/girwriter: Add tests for async methods attributed with NoWrapper
- Date: Sun, 28 Feb 2021 08:58:21 +0000 (UTC)
commit 8d6d79affee6cb7b28427b6c8e03b466ddc69626
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 129cdd0e3..6be6fd561 100644
--- a/tests/girwriter/GirTest-1.0.gir-expected
+++ b/tests/girwriter/GirTest-1.0.gir-expected
@@ -848,6 +848,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>
@@ -1080,6 +1109,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">
@@ -1334,6 +1396,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">
@@ -1477,6 +1568,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">
@@ -1965,6 +2089,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>
@@ -2145,6 +2298,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 72d3e8866..5867ad5d1 100644
--- a/tests/girwriter/girtest.vala
+++ b/tests/girwriter/girtest.vala
@@ -84,6 +84,9 @@ namespace GirTest {
[NoWrapper]
public virtual void no_wrapper_method () {
}
+ [NoWrapper]
+ public virtual async void no_wrapper_method_async () {
+ }
}
[GIR (visible = false)]
@@ -287,6 +290,10 @@ namespace GirTest {
[NoWrapper]
public virtual void no_wrapper_method () {
}
+
+ [NoWrapper]
+ public virtual async void no_wrapper_method_async () {
+ }
}
public abstract class AbstractObjectTest : Object {
@@ -307,6 +314,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 672e0de4b..f48df4c58 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 6b66c49d9..af3c73862 100644
--- a/tests/girwriter/girtest.vapigen-expected
+++ b/tests/girwriter/girtest.vapigen-expected
@@ -16,6 +16,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]
@@ -108,6 +110,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);
@@ -155,6 +159,8 @@ namespace GirTest {
public virtual void internal_method ();
[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]