From: Rico Tzschichholz Date: Sat, 20 Feb 2021 19:04:08 +0000 (+0100) Subject: tests/girwriter: Increase coverage X-Git-Tag: 0.51.3~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=591a66a37ce30f9713a5d14e065663959447cc1e;p=thirdparty%2Fvala.git tests/girwriter: Increase coverage --- 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 @@ + + + + + @@ -2180,6 +2185,29 @@ + + + + + + + + + + + + + + + + + + + + + + + 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)]