[vala/staging] tests/girwriter: Increase coverage



commit 591a66a37ce30f9713a5d14e065663959447cc1e
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Feb 20 20:04:08 2021 +0100

    tests/girwriter: Increase coverage

 tests/girwriter/GirTest-1.0.gir-expected | 28 ++++++++++++++++++++++++++++
 tests/girwriter/GirTest-1.0.metadata     | 10 ++++++++++
 tests/girwriter/girtest.vala             |  4 ++++
 tests/girwriter/girtest.vapi-expected    |  3 +++
 tests/girwriter/girtest.vapigen-expected | 21 +++++++++++++++------
 5 files changed, 60 insertions(+), 6 deletions(-)
---
diff --git a/tests/girwriter/GirTest-1.0.gir-expected b/tests/girwriter/GirTest-1.0.gir-expected
index 18502ffc8..5579c2dd2 100644
--- a/tests/girwriter/GirTest-1.0.gir-expected
+++ b/tests/girwriter/GirTest-1.0.gir-expected
@@ -2131,6 +2131,11 @@
                                </parameter>
                        </parameters>
                </virtual-method>
+               <function name="static_method" c:identifier="gir_test_interface_test_static_method">
+                       <return-value transfer-ownership="full">
+                               <type name="none" c:type="void"/>
+                       </return-value>
+               </function>
                <property name="property" writable="1" construct="1">
                        <type name="gint" c:type="gint"/>
                </property>
@@ -2180,6 +2185,29 @@
                                </parameter>
                        </parameters>
                </virtual-method>
+               <method name="some_signal" c:identifier="gir_test_interface_test_some_signal">
+                       <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="param" transfer-ownership="none">
+                                       <type name="gint" c:type="gint"/>
+                               </parameter>
+                       </parameters>
+               </method>
+               <glib:signal name="some-signal">
+                       <return-value transfer-ownership="full">
+                               <type name="none" c:type="void"/>
+                       </return-value>
+                       <parameters>
+                               <parameter name="param" transfer-ownership="none">
+                                       <type name="gint" c:type="gint"/>
+                               </parameter>
+                       </parameters>
+               </glib:signal>
        </interface>
        <record name="InterfaceTestIface" c:type="GirTestInterfaceTestIface" 
glib:is-gtype-struct-for="InterfaceTest">
                <field name="parent_iface" readable="0" private="1">
diff --git a/tests/girwriter/GirTest-1.0.metadata b/tests/girwriter/GirTest-1.0.metadata
index 49ebef7d3..228e504e2 100644
--- a/tests/girwriter/GirTest-1.0.metadata
+++ b/tests/girwriter/GirTest-1.0.metadata
@@ -1,14 +1,24 @@
 AbstractObjectTest
+       .method_throw throws="GirTest.ErrorTest"
        .method_valist skip=false
        .*#virtual_method abstract
 BoxedStruct struct
 CompactClass struct=false
        .s unowned=false
+DelegateErrorTest throws="GirTest.ErrorTest"
 InterfaceTest
        .*#virtual_method virtual
 ObjectTest
+       .coroutine_method_throw throws="GirTest.ErrorTest"
        .fixed_array_field unowned=false
+       .method_throw throws="GirTest.ErrorTest"
+       .method_valist skip=false
+       .method_varargs skip=false
+       .new_valist name="new_valist" skip=false
+       .newv skip=false
+       .may_fail throws="GirTest.ErrorTest"
        .nullable_field unowned=false
+       .simple_throw throws="GirTest.ErrorTest"
 SubTypeTest
        .array_field unowned=false
        .delegate_field unowned=false
diff --git a/tests/girwriter/girtest.vala b/tests/girwriter/girtest.vala
index 5867ad5d1..092b88cd4 100644
--- a/tests/girwriter/girtest.vala
+++ b/tests/girwriter/girtest.vala
@@ -87,6 +87,10 @@ namespace GirTest {
                [NoWrapper]
                public virtual async void no_wrapper_method_async () {
                }
+               [HasEmitter]
+               public signal void some_signal (int param);
+               public static void static_method () {
+               }
        }
 
        [GIR (visible = false)]
diff --git a/tests/girwriter/girtest.vapi-expected b/tests/girwriter/girtest.vapi-expected
index f48df4c58..e1d7a4f69 100644
--- a/tests/girwriter/girtest.vapi-expected
+++ b/tests/girwriter/girtest.vapi-expected
@@ -133,7 +133,10 @@ namespace GirTest {
                public virtual async void no_wrapper_method_async ();
                [GIR (visible = false)]
                public virtual async void skipped_coroutine_method (int param);
+               public static void static_method ();
                public abstract int property { get; set construct; }
+               [HasEmitter]
+               public signal void some_signal (int param);
        }
        [CCode (cheader_filename = "girtest.h")]
        public interface PrerequisiteTest : GirTest.InterfaceTest {
diff --git a/tests/girwriter/girtest.vapigen-expected b/tests/girwriter/girtest.vapigen-expected
index 1bb13d94d..cb0724d19 100644
--- a/tests/girwriter/girtest.vapigen-expected
+++ b/tests/girwriter/girtest.vapigen-expected
@@ -12,7 +12,7 @@ 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 GLib.Error;
+               public abstract void method_throw () throws GirTest.ErrorTest;
                public abstract void method_valist (int param, va_list vargs);
                [NoWrapper]
                public abstract void no_wrapper_method ();
@@ -85,7 +85,7 @@ namespace GirTest {
                [CCode (array_length_pos = 0.1)]
                public (unowned string)[] container_return ();
                public async void coroutine_async ();
-               public virtual async void coroutine_method_throw (int i1, out int o1) throws GLib.Error;
+               public virtual async void coroutine_method_throw (int i1, out int o1) throws 
GirTest.ErrorTest, GLib.Error;
                public virtual void coroutine_method_throw_finish (GLib.AsyncResult _res_, out int o1) throws 
GLib.Error;
                public virtual async void coroutine_virtual_async ();
                public virtual void coroutine_virtual_finish (GLib.AsyncResult _res_);
@@ -103,11 +103,15 @@ namespace GirTest {
                public int[] int_in_int_in_array_return (int param1, int param2);
                public virtual void internal_method_with_default_impl (int8 param);
                [CCode (cname = "gir_test_object_test_new_may_fail", has_construct_function = false)]
-               public ObjectTest.may_fail (int param) throws GLib.Error;
+               public ObjectTest.may_fail (int param) throws GirTest.ErrorTest;
                public void method ();
-               public virtual void method_throw () throws GLib.Error;
+               public virtual void method_throw () throws GirTest.ErrorTest;
+               public void method_valist (int param, va_list vargs);
+               public void method_varargs (int param, ...);
                public void method_with_default (int i);
                public virtual void method_with_default_impl (int8 param);
+               [CCode (cname = "gir_test_object_test_new_newv", has_construct_function = false)]
+               public ObjectTest.newv (int param, ...);
                [NoWrapper]
                public virtual void no_wrapper_method ();
                [NoWrapper]
@@ -119,11 +123,13 @@ namespace GirTest {
                public void set_some_property (string value);
                public void set_write_only_property (string value);
                public unowned GLib.EqualFunc simple_delegate_return ();
-               public void simple_throw () throws GLib.Error;
+               public void simple_throw () throws GirTest.ErrorTest;
                public static void static_method ();
                public void string_array_out ([CCode (array_length_cname = "array_length1", array_length_pos 
= 1.1)] out string[] array);
                [CCode (array_length_pos = 0.1)]
                public string[] string_array_return ();
+               [CCode (cname = "gir_test_object_test_new_new_valist", has_construct_function = false)]
+               public ObjectTest.valist (int param, va_list vargs);
                [CCode (cname = "gir_test_object_test_new_with_int", has_construct_function = false)]
                public ObjectTest.with_int (int param);
                [NoAccessorMethod]
@@ -162,7 +168,10 @@ namespace GirTest {
                [NoWrapper]
                public virtual async void no_wrapper_method_async ();
                public virtual void set_property (int value);
+               public static void static_method ();
                public abstract int property { get; set construct; }
+               [HasEmitter]
+               public signal void some_signal (int param);
        }
        [CCode (cheader_filename = "girtest.h", type_id = "gir_test_prerequisite_test_get_type ()")]
        public interface PrerequisiteTest : GirTest.InterfaceTest, GLib.Object {
@@ -205,7 +214,7 @@ namespace GirTest {
                FISHY
        }
        [CCode (cheader_filename = "girtest.h", has_target = false)]
-       public delegate bool DelegateErrorTest () throws GLib.Error;
+       public delegate bool DelegateErrorTest () throws GirTest.ErrorTest;
        [CCode (cheader_filename = "girtest.h", instance_pos = 8.9)]
        public delegate bool DelegateGenericsTest (GLib.Type g_type, GLib.BoxedCopyFunc g_dup_func, 
GLib.DestroyNotify g_destroy_func, GLib.Type t_type, GLib.BoxedCopyFunc t_dup_func, GLib.DestroyNotify 
t_destroy_func, void* g, void* t);
        [CCode (cheader_filename = "girtest.h", instance_pos = 2.9)]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]