From: Rico Tzschichholz Date: Thu, 17 Oct 2019 05:45:16 +0000 (+0200) Subject: tests: Extent "girwriter" test to increase coverage X-Git-Tag: 0.47.1~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98d7546d227b5a67f4b1ecb0e0be560a2a397b94;p=thirdparty%2Fvala.git tests: Extent "girwriter" test to increase coverage --- diff --git a/tests/girwriter/GirTest-1.0.gir-expected b/tests/girwriter/GirTest-1.0.gir-expected index 387df18ae..a03f48fc6 100644 --- a/tests/girwriter/GirTest-1.0.gir-expected +++ b/tests/girwriter/GirTest-1.0.gir-expected @@ -137,6 +137,16 @@ + + + + + + + + + + @@ -527,6 +537,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -707,6 +763,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -933,6 +1022,19 @@ + + + + + + + + + + + + + @@ -1411,6 +1513,11 @@ + + + + + diff --git a/tests/girwriter/girtest.vala b/tests/girwriter/girtest.vala index 7673706d9..e9b3d2ae1 100644 --- a/tests/girwriter/girtest.vala +++ b/tests/girwriter/girtest.vala @@ -79,6 +79,8 @@ namespace GirTest { public delegate bool DelegateTest (void* a, void* b); + public delegate bool DelegateErrorTest () throws ErrorTest; + public delegate bool DelegateGenericsTest (G g, T t); [GIR (visible = false)] @@ -121,6 +123,9 @@ namespace GirTest { public ObjectTest.with_int (int param) { field = param; } + public ObjectTest.may_fail (int param) throws ErrorTest { + field = param; + } public ObjectTest.newv (int param, ...) { field = param; } @@ -234,6 +239,9 @@ namespace GirTest { public async void coroutine_async () { } + public virtual async void coroutine_virtual_async () { + } + public virtual async void coroutine_method_throw (int i1, out int o1) throws ErrorTest { o1 = i1; } @@ -269,6 +277,12 @@ namespace GirTest { public int property { get; construct set; } } + [Compact] + public class CompactClass { + public string s; + public int i; + } + [GIR (visible = false)] public class SkippedClass { } diff --git a/tests/girwriter/girtest.vapi-expected b/tests/girwriter/girtest.vapi-expected index 854c2cfd5..f92e00d05 100644 --- a/tests/girwriter/girtest.vapi-expected +++ b/tests/girwriter/girtest.vapi-expected @@ -9,6 +9,13 @@ namespace GirTest { public abstract void method_throw () throws GirTest.ErrorTest; } [CCode (cheader_filename = "girtest.h")] + [Compact] + public class CompactClass { + public int i; + public string s; + public CompactClass (); + } + [CCode (cheader_filename = "girtest.h")] [Version (deprecated = true, deprecated_since = "0.1.2", since = "0.1.0")] public class DeprecatedClassTest { public DeprecatedClassTest (); @@ -42,6 +49,7 @@ namespace GirTest { public (unowned string)[] container_return (); public async void coroutine_async (); public virtual async void coroutine_method_throw (int i1, out int o1) throws GirTest.ErrorTest; + public virtual async void coroutine_virtual_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); @@ -52,6 +60,7 @@ namespace GirTest { public void int8_out (out int8 param); 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 ObjectTest.may_fail (int param) throws GirTest.ErrorTest; public void method (); public virtual void method_throw () throws GirTest.ErrorTest; public void method_valist (int param, va_list vargs); @@ -163,6 +172,8 @@ namespace GirTest { FISHY } [CCode (cheader_filename = "girtest.h")] + public delegate bool DelegateErrorTest () throws GirTest.ErrorTest; + [CCode (cheader_filename = "girtest.h")] public delegate bool DelegateGenericsTest (G g, T t); [CCode (cheader_filename = "girtest.h")] public delegate bool DelegateTest (void* a, void* b);