[vala/staging: 2/5] tests: Extent "girwriter" test to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 2/5] tests: Extent "girwriter" test to increase coverage
- Date: Mon, 8 Oct 2018 08:32:40 +0000 (UTC)
commit 81658eb90c012aa1cff247bce11bfcbe10621d18
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Sep 24 15:29:15 2018 +0200
tests: Extent "girwriter" test to increase coverage
tests/girwriter/GirTest-1.0.gir-expected | 336 ++++++++++++++++++++++++++++++-
tests/girwriter/Makefile.am | 2 +
tests/girwriter/girtest.vala | 53 ++++-
tests/girwriter/girtest.vapi-expected | 33 ++-
4 files changed, 419 insertions(+), 5 deletions(-)
---
diff --git a/tests/girwriter/GirTest-1.0.gir-expected b/tests/girwriter/GirTest-1.0.gir-expected
index 02edb2aa7..18f275596 100644
--- a/tests/girwriter/GirTest-1.0.gir-expected
+++ b/tests/girwriter/GirTest-1.0.gir-expected
@@ -2,13 +2,14 @@
<repository version="1.2" xmlns="http://www.gtk.org/introspection/core/1.0"
xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<include name="GObject" version="2.0"/>
<include name="GLib" version="2.0"/>
+<include name="Gio" version="2.0"/>
<package name="girtest"/>
<c:include name="girtest.h"/>
-<namespace name="GirTest" version="1.0" c:prefix="GirTest">
+<namespace name="GirTest" version="1.0" shared-library="girtest" c:prefix="GirTest">
<enumeration name="EnumTest" c:type="GirTestEnumTest" glib:type-name="GirTestEnumTest"
glib:get-type="gir_test_enum_test_get_type">
<member name="value1" c:identifier="GIR_TEST_ENUM_TEST_VALUE1" value="0"/>
<member name="value2" c:identifier="GIR_TEST_ENUM_TEST_VALUE2" value="1"/>
- <member name="value3" c:identifier="GIR_TEST_ENUM_TEST_VALUE3" value="2"/>
+ <member name="value3" c:identifier="GIR_TEST_ENUM_TEST_VALUE3" value="4711"/>
</enumeration>
<bitfield name="FlagsTest" c:type="GirTestFlagsTest" glib:type-name="GirTestFlagsTest"
glib:get-type="gir_test_flags_test_get_type">
<member name="value1" c:identifier="GIR_TEST_FLAGS_TEST_VALUE1" value="1"/>
@@ -21,6 +22,11 @@
<enumeration name="SkippedFlags" c:type="GirTestSkippedFlags" glib:type-name="GirTestSkippedFlags"
glib:get-type="gir_test_skipped_flags_get_type" introspectable="0">
<member name="value1" c:identifier="GIR_TEST_SKIPPED_FLAGS_VALUE1" value="0"/>
</enumeration>
+ <enumeration name="ErrorTest" c:type="GirTestErrorTest" glib:error-domain="gir_test_error_test-quark">
+ <member name="failed" c:identifier="GIR_TEST_ERROR_TEST_FAILED" value="0"/>
+ <member name="smelly" c:identifier="GIR_TEST_ERROR_TEST_SMELLY" value="1"/>
+ <member name="fishy" c:identifier="GIR_TEST_ERROR_TEST_FISHY" value="23"/>
+ </enumeration>
<record name="SkippedStruct" introspectable="0">
<constructor name="new" c:identifier="gir_test_skipped_struct_new">
<return-value transfer-ownership="full">
@@ -301,6 +307,33 @@
</parameter>
</parameters>
</method>
+ <method name="string_array_out" c:identifier="gir_test_object_test_string_array_out">
+ <return-value transfer-ownership="full">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <parameter name="array" direction="out" transfer-ownership="full">
+ <array length="1">
+ <type name="utf8" c:type="gchar*"/>
+ </array>
+ </parameter>
+ <parameter name="array_length1" direction="out" transfer-ownership="none">
+ <type name="gint" c:type="gint*"/>
+ </parameter>
+ </parameters>
+ </method>
+ <method name="string_array_return" c:identifier="gir_test_object_test_string_array_return">
+ <return-value transfer-ownership="full">
+ <array length="0">
+ <type name="utf8" c:type="gchar*"/>
+ </array>
+ </return-value>
+ <parameters>
+ <parameter name="result_length1" direction="out" transfer-ownership="none">
+ <type name="gint" c:type="gint*"/>
+ </parameter>
+ </parameters>
+ </method>
<method name="none_in" c:identifier="gir_test_object_test_none_in">
<return-value transfer-ownership="full">
<type name="none"/>
@@ -374,11 +407,101 @@
<parameters>
</parameters>
</method>
+ <method name="coroutine_async" c:identifier="gir_test_object_test_coroutine_async">
+ <return-value transfer-ownership="none">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <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>
+ </method>
+ <method name="coroutine_finish" c:identifier="gir_test_object_test_coroutine_finish">
+ <return-value transfer-ownership="full">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <parameter name="_res_" transfer-ownership="none">
+ <type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
+ </parameter>
+ </parameters>
+ </method>
+ <method name="simple_throw" c:identifier="gir_test_object_test_simple_throw" throws="1">
+ <return-value transfer-ownership="full">
+ <type name="none"/>
+ </return-value>
+ </method>
+ <method name="method_throw" c:identifier="gir_test_object_test_method_throw" throws="1">
+ <return-value transfer-ownership="full">
+ <type name="none"/>
+ </return-value>
+ </method>
+ <virtual-method name="method_throw" invoker="method_throw" throws="1">
+ <return-value transfer-ownership="full">
+ <type name="none"/>
+ </return-value>
+ </virtual-method>
<method name="skipped_method" c:identifier="gir_test_object_test_skipped_method"
introspectable="0">
<return-value transfer-ownership="full">
<type name="none"/>
</return-value>
</method>
+ <property name="some-property" writable="1" construct="1">
+ <type name="utf8" c:type="gchar*"/>
+ </property>
+ <method name="get_some_property" c:identifier="gir_test_object_test_get_some_property">
+ <return-value transfer-ownership="none">
+ <type name="utf8" c:type="const gchar*"/>
+ </return-value>
+ </method>
+ <method name="set_some_property" c:identifier="gir_test_object_test_set_some_property">
+ <return-value transfer-ownership="none">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <parameter name="value" transfer-ownership="none">
+ <type name="utf8" c:type="const gchar*"/>
+ </parameter>
+ </parameters>
+ </method>
+ <property name="write-only-property" readable="0" writable="1">
+ <type name="utf8" c:type="gchar*"/>
+ </property>
+ <method name="set_write_only_property"
c:identifier="gir_test_object_test_set_write_only_property">
+ <return-value transfer-ownership="none">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <parameter name="value" transfer-ownership="none">
+ <type name="utf8" c:type="const gchar*"/>
+ </parameter>
+ </parameters>
+ </method>
+ <property name="construct-only-property" readable="0" writable="1" construct-only="1">
+ <type name="utf8" c:type="gchar*"/>
+ </property>
+ <property name="skipped-property" writable="1" construct="1" introspectable="0">
+ <type name="utf8" c:type="gchar*"/>
+ </property>
+ <method name="get_skipped_property" c:identifier="gir_test_object_test_get_skipped_property">
+ <return-value transfer-ownership="none">
+ <type name="utf8" c:type="const gchar*"/>
+ </return-value>
+ </method>
+ <method name="set_skipped_property" c:identifier="gir_test_object_test_set_skipped_property">
+ <return-value transfer-ownership="none">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <parameter name="value" transfer-ownership="none">
+ <type name="utf8" c:type="const gchar*"/>
+ </parameter>
+ </parameters>
+ </method>
<glib:signal name="some-signal">
<return-value transfer-ownership="full">
<type name="none"/>
@@ -419,6 +542,18 @@
</parameters>
</callback>
</field>
+ <field name="method_throw">
+ <callback name="method_throw" c:type="method_throw" throws="1">
+ <return-value transfer-ownership="full">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <parameter name="self" transfer-ownership="none">
+ <type name="GirTest.ObjectTest" c:type="GirTestObjectTest*"/>
+ </parameter>
+ </parameters>
+ </callback>
+ </field>
</record>
<record name="ObjectTestPrivate" c:type="GirTestObjectTestPrivate" disguised="1"/>
<class name="AbstractObjectTest" c:type="GirTestAbstractObjectTest"
glib:type-name="GirTestAbstractObjectTest" glib:get-type="gir_test_abstract_object_test_get_type"
glib:type-struct="AbstractObjectTestClass" parent="GObject.Object" abstract="1">
@@ -488,6 +623,16 @@
</parameter>
</parameters>
</virtual-method>
+ <method name="method_throw" c:identifier="gir_test_abstract_object_test_method_throw"
throws="1">
+ <return-value transfer-ownership="full">
+ <type name="none"/>
+ </return-value>
+ </method>
+ <virtual-method name="method_throw" invoker="method_throw" throws="1">
+ <return-value transfer-ownership="full">
+ <type name="none"/>
+ </return-value>
+ </virtual-method>
</class>
<record name="AbstractObjectTestClass" c:type="GirTestAbstractObjectTestClass"
glib:is-gtype-struct-for="AbstractObjectTest">
<field name="parent_class">
@@ -538,8 +683,40 @@
</parameters>
</callback>
</field>
+ <field name="method_throw">
+ <callback name="method_throw" c:type="method_throw" throws="1">
+ <return-value transfer-ownership="full">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <parameter name="self" transfer-ownership="none">
+ <type name="GirTest.AbstractObjectTest"
c:type="GirTestAbstractObjectTest*"/>
+ </parameter>
+ </parameters>
+ </callback>
+ </field>
</record>
<record name="AbstractObjectTestPrivate" c:type="GirTestAbstractObjectTestPrivate" disguised="1"/>
+ <class name="ImplementionTest" c:type="GirTestImplementionTest"
glib:type-name="GirTestImplementionTest" glib:get-type="gir_test_implemention_test_get_type"
glib:type-struct="ImplementionTestClass" parent="GObject.Object">
+ <implements name="GirTest.InterfaceTest"/>
+ <field name="parent_instance">
+ <type name="GObject.Object" c:type="GObject"/>
+ </field>
+ <field name="priv">
+ <type name="ImplementionTestPrivate" c:type="GirTestImplementionTestPrivate*"/>
+ </field>
+ <constructor name="new" c:identifier="gir_test_implemention_test_new">
+ <return-value transfer-ownership="full">
+ <type name="GirTest.ImplementionTest" c:type="GirTestImplementionTest*"/>
+ </return-value>
+ </constructor>
+ </class>
+ <record name="ImplementionTestClass" c:type="GirTestImplementionTestClass"
glib:is-gtype-struct-for="ImplementionTest">
+ <field name="parent_class">
+ <type name="GObject.ObjectClass" c:type="GObjectClass"/>
+ </field>
+ </record>
+ <record name="ImplementionTestPrivate" c:type="GirTestImplementionTestPrivate" disguised="1"/>
<record name="SkippedClass" introspectable="0">
<constructor name="new" c:identifier="gir_test_skippedclass_new">
<return-value transfer-ownership="full">
@@ -547,7 +724,15 @@
</return-value>
</constructor>
</record>
+ <record name="DeprecatedClassTest" deprecated="1" deprecated-version="0.1.2" version="0.1.0">
+ <constructor name="new" c:identifier="gir_test_deprecated_class_test_new">
+ <return-value transfer-ownership="full">
+ <type name="GirTest.DeprecatedClassTest"
c:type="GirTestDeprecatedClassTest*"/>
+ </return-value>
+ </constructor>
+ </record>
<interface name="InterfaceTest" c:type="GirTestInterfaceTest" glib:type-name="GirTestInterfaceTest"
glib:get-type="gir_test_interface_test_get_type" glib:type-struct="InterfaceTestIface">
+ <prerequisite name="GObject.Object"/>
<method name="int8_in" c:identifier="gir_test_interface_test_int8_in">
<return-value transfer-ownership="full">
<type name="none"/>
@@ -568,6 +753,85 @@
</parameter>
</parameters>
</virtual-method>
+ <method name="coroutine_async" c:identifier="gir_test_interface_test_coroutine_async">
+ <return-value transfer-ownership="none">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <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>
+ </method>
+ <method name="coroutine_finish" c:identifier="gir_test_interface_test_coroutine_finish">
+ <return-value transfer-ownership="full">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <parameter name="_res_" transfer-ownership="none">
+ <type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
+ </parameter>
+ </parameters>
+ </method>
+ <virtual-method name="coroutine_async" invoker="coroutine_async">
+ <return-value transfer-ownership="none">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <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="coroutine_finish" invoker="coroutine_finish">
+ <return-value transfer-ownership="full">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <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>
+ <method name="get_property" c:identifier="gir_test_interface_test_get_property">
+ <return-value transfer-ownership="none">
+ <type name="gint" c:type="gint"/>
+ </return-value>
+ </method>
+ <virtual-method name="get_property" invoker="get_property">
+ <return-value transfer-ownership="none">
+ <type name="gint" c:type="gint"/>
+ </return-value>
+ </virtual-method>
+ <method name="set_property" c:identifier="gir_test_interface_test_set_property">
+ <return-value transfer-ownership="none">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <parameter name="value" transfer-ownership="none">
+ <type name="gint" c:type="gint"/>
+ </parameter>
+ </parameters>
+ </method>
+ <virtual-method name="set_property" invoker="set_property">
+ <return-value transfer-ownership="none">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <parameter name="value" transfer-ownership="none">
+ <type name="gint" c:type="gint"/>
+ </parameter>
+ </parameters>
+ </virtual-method>
</interface>
<record name="InterfaceTestIface" c:type="GirTestInterfaceTestIface"
glib:is-gtype-struct-for="InterfaceTest">
<field name="parent_iface">
@@ -588,6 +852,66 @@
</parameters>
</callback>
</field>
+ <field name="coroutine_async">
+ <callback name="coroutine_async" c:type="coroutine_async">
+ <return-value transfer-ownership="none">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <parameter name="self" transfer-ownership="none">
+ <type name="GirTest.InterfaceTest"
c:type="GirTestInterfaceTest*"/>
+ </parameter>
+ <parameter name="_callback_" transfer-ownership="none" allow-none="1"
closure="2" 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="coroutine_finish">
+ <callback name="coroutine_finish" c:type="coroutine_finish">
+ <return-value transfer-ownership="full">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <parameter name="self" transfer-ownership="none">
+ <type name="GirTest.InterfaceTest"
c:type="GirTestInterfaceTest*"/>
+ </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">
+ <type name="gint" c:type="gint"/>
+ </return-value>
+ <parameters>
+ <parameter name="self" transfer-ownership="none">
+ <type name="GirTest.InterfaceTest"
c:type="GirTestInterfaceTest*"/>
+ </parameter>
+ </parameters>
+ </callback>
+ </field>
+ <field name="set_property">
+ <callback name="set_property" c:type="set_property">
+ <return-value transfer-ownership="none">
+ <type name="none"/>
+ </return-value>
+ <parameters>
+ <parameter name="self" transfer-ownership="none">
+ <type name="GirTest.InterfaceTest"
c:type="GirTestInterfaceTest*"/>
+ </parameter>
+ <parameter name="value" transfer-ownership="none">
+ <type name="gint" c:type="gint"/>
+ </parameter>
+ </parameters>
+ </callback>
+ </field>
</record>
<interface name="SkippedInterface" c:type="GirTestSkippedInterface"
glib:type-name="GirTestSkippedInterface" glib:get-type="gir_test_skipped_interface_get_type"
glib:type-struct="SkippedInterfaceIface" introspectable="0">
</interface>
@@ -596,6 +920,14 @@
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
</record>
+ <interface name="PrerequisiteTest" c:type="GirTestPrerequisiteTest"
glib:type-name="GirTestPrerequisiteTest" glib:get-type="gir_test_prerequisite_test_get_type"
glib:type-struct="PrerequisiteTestIface">
+ <prerequisite name="GirTest.InterfaceTest"/>
+ </interface>
+ <record name="PrerequisiteTestIface" c:type="GirTestPrerequisiteTestIface"
glib:is-gtype-struct-for="PrerequisiteTest">
+ <field name="parent_iface">
+ <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
+ </field>
+ </record>
<record name="BoxedStruct">
<field name="field_name">
<type name="gint" c:type="gint"/>
diff --git a/tests/girwriter/Makefile.am b/tests/girwriter/Makefile.am
index c674d7d23..7f7a0e048 100644
--- a/tests/girwriter/Makefile.am
+++ b/tests/girwriter/Makefile.am
@@ -5,8 +5,10 @@ check-girwriter: $(top_builddir)/compiler/valac
-C \
--disable-version-header \
--vapidir $(top_srcdir)/vapi \
+ --pkg gio-2.0 \
--gir GirTest-1.0.gir \
--library girtest \
+ --shared-library girtest \
$(srcdir)/girtest.vala; \
tail -n +3 girtest.vapi | diff -wu $(srcdir)/girtest.vapi-expected - || exit 1; \
diff -wu $(srcdir)/GirTest-1.0.gir-expected GirTest-1.0.gir || exit 1; \
diff --git a/tests/girwriter/girtest.vala b/tests/girwriter/girtest.vala
index c5d4f928b..806b3312a 100644
--- a/tests/girwriter/girtest.vala
+++ b/tests/girwriter/girtest.vala
@@ -20,7 +20,7 @@ namespace GirTest {
public enum EnumTest {
VALUE1,
VALUE2,
- VALUE3
+ VALUE3 = 4711
}
[Flags]
@@ -40,9 +40,18 @@ namespace GirTest {
VALUE1
}
- public interface InterfaceTest {
+ public errordomain ErrorTest {
+ FAILED,
+ SMELLY,
+ FISHY = 23
+ }
+
+ public interface InterfaceTest : Object {
+ public abstract int property { get; construct set; }
public virtual void int8_in (int8 param) {
}
+ public virtual async void coroutine_async () {
+ }
}
[GIR (visible = false)]
@@ -63,6 +72,16 @@ namespace GirTest {
public signal void skipped_signal (int param);
public int field = 42;
+
+ public string some_property { get; construct set; }
+
+ public string write_only_property { set; }
+
+ public string construct_only_property { construct; }
+
+ [GIR (visible = false)]
+ public string skipped_property { get; construct set; }
+
public ObjectTest () {
}
public ObjectTest.with_int (int param) {
@@ -141,6 +160,14 @@ namespace GirTest {
return new int[8];
}
+ public void string_array_out (out string[] array) {
+ array = { "foo" };
+ }
+
+ public string[] string_array_return () {
+ return { "foo" };
+ }
+
public void none_in () {
}
@@ -162,6 +189,15 @@ namespace GirTest {
return str_equal;
}
+ public async void coroutine_async () {
+ }
+
+ public void simple_throw () throws ErrorTest {
+ }
+
+ public virtual void method_throw () throws ErrorTest {
+ }
+
[GIR (visible = false)]
public void skipped_method () {
}
@@ -173,9 +209,22 @@ namespace GirTest {
public abstract void method_int8_inout (ref int8 param);
public abstract void method_int8_out (out int8 param);
+
+ public abstract void method_throw () throws ErrorTest;
+ }
+
+ public interface PrerequisiteTest : InterfaceTest {
+ }
+
+ public class ImplementionTest : Object, InterfaceTest {
+ public int property { get; construct set; }
}
[GIR (visible = false)]
public class SkippedClass {
}
+
+ [Version (deprecated = true, deprecated_since = "0.1.2", since = "0.1.0")]
+ public class DeprecatedClassTest {
+ }
}
diff --git a/tests/girwriter/girtest.vapi-expected b/tests/girwriter/girtest.vapi-expected
index b6b37542e..2b5a9a466 100644
--- a/tests/girwriter/girtest.vapi-expected
+++ b/tests/girwriter/girtest.vapi-expected
@@ -6,6 +6,16 @@ namespace GirTest {
public abstract void method_int8_in (int8 param);
public abstract void method_int8_inout (ref int8 param);
public abstract void method_int8_out (out int8 param);
+ public abstract void method_throw () throws GirTest.ErrorTest;
+ }
+ [CCode (cheader_filename = "girtest.h")]
+ [Version (deprecated = true, deprecated_since = "0.1.2", since = "0.1.0")]
+ public class DeprecatedClassTest {
+ public DeprecatedClassTest ();
+ }
+ [CCode (cheader_filename = "girtest.h")]
+ public class ImplementionTest : GLib.Object, GirTest.InterfaceTest {
+ public ImplementionTest ();
}
[CCode (cheader_filename = "girtest.h")]
public class ObjectTest : GLib.Object {
@@ -16,6 +26,7 @@ namespace GirTest {
public void array_out (out int[] array);
public int[] array_return ();
public int[] array_return_int_in_delegate_out (int i1, out GirTest.DelegateTest d);
+ public async void coroutine_async ();
public GirTest.DelegateTest delegate_return ();
public GirTest.DelegateTest delegate_return_int_in_array_out (int i1, out int[] a);
public static void full_inout (ref GirTest.ObjectTest obj);
@@ -26,6 +37,7 @@ namespace GirTest {
public void int_in_int_in_array_out (int param1, int param2, out int[] array);
public int[] int_in_int_in_array_return (int param1, int param2);
public void method ();
+ public virtual void method_throw () throws GirTest.ErrorTest;
public void method_valist (int param, va_list vargs);
public void method_varargs (int param, ...);
public virtual void method_with_default_impl (int8 param);
@@ -36,10 +48,18 @@ namespace GirTest {
public static void none_out (out unowned GirTest.ObjectTest obj);
public static unowned GirTest.ObjectTest none_return ();
public GLib.EqualFunc simple_delegate_return ();
+ public void simple_throw () throws GirTest.ErrorTest;
[GIR (visible = false)]
public void skipped_method ();
public static void static_method ();
+ public void string_array_out (out string[] array);
+ public string[] string_array_return ();
public ObjectTest.with_int (int param);
+ public string construct_only_property { construct; }
+ [GIR (visible = false)]
+ public string skipped_property { get; set construct; }
+ public string some_property { get; set construct; }
+ public string write_only_property { set; }
[GIR (visible = false)]
public signal void skipped_signal (int param);
public signal void some_signal (int param);
@@ -55,8 +75,13 @@ namespace GirTest {
public SkippedStruct ();
}
[CCode (cheader_filename = "girtest.h")]
- public interface InterfaceTest {
+ public interface InterfaceTest : GLib.Object {
+ public virtual async void coroutine_async ();
public virtual void int8_in (int8 param);
+ public abstract int property { get; set construct; }
+ }
+ [CCode (cheader_filename = "girtest.h")]
+ public interface PrerequisiteTest : GirTest.InterfaceTest {
}
[CCode (cheader_filename = "girtest.h")]
[GIR (visible = false)]
@@ -92,6 +117,12 @@ namespace GirTest {
VALUE1
}
[CCode (cheader_filename = "girtest.h")]
+ public errordomain ErrorTest {
+ FAILED,
+ SMELLY,
+ FISHY
+ }
+ [CCode (cheader_filename = "girtest.h")]
public delegate bool DelegateTest (void* a, void* b);
[CCode (cheader_filename = "girtest.h")]
[GIR (visible = false)]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]