From: Rico Tzschichholz Date: Fri, 5 Mar 2021 18:32:38 +0000 (+0100) Subject: tests: Add more "gir" tests to increase coverage X-Git-Tag: 0.51.90~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=328faa8e402b8f4b6abbc7099929c3e1442336b2;p=thirdparty%2Fvala.git tests: Add more "gir" tests to increase coverage --- diff --git a/tests/Makefile.am b/tests/Makefile.am index fce8f5f2d..a74714d9e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -715,6 +715,7 @@ TESTS = \ gir/bug792998.test \ gir/alias.test \ gir/array-fixed-length.test \ + gir/async-creation-method.test \ gir/async-result-pos.test \ gir/async-sync-out.test \ gir/class.test \ @@ -734,6 +735,7 @@ TESTS = \ gir/parameter-array-length-type.test \ gir/parameter-nullable-out-simple-type.test \ gir/property-non-readable.test \ + gir/signal-virtual.test \ gir/symbol-type-csuffix.test \ gir/union.test \ gir/union-transparent.test \ diff --git a/tests/gir/async-creation-method.test b/tests/gir/async-creation-method.test new file mode 100644 index 000000000..fccafb0b8 --- /dev/null +++ b/tests/gir/async-creation-method.test @@ -0,0 +1,70 @@ +GIR + +Input: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Output: + +[CCode (cheader_filename = "test.h", type_id = "test_foo_get_type ()")] +public class Foo : GLib.Object { + [CCode (cname = "test_foo_new_async", has_construct_function = false)] + public async Foo (GLib.Cancellable? cancellable) throws GLib.Error; +} diff --git a/tests/gir/signal-virtual.test b/tests/gir/signal-virtual.test new file mode 100644 index 000000000..b0073eddd --- /dev/null +++ b/tests/gir/signal-virtual.test @@ -0,0 +1,49 @@ +GIR + +Input: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Output: + +[CCode (cheader_filename = "test.h", type_id = "test_foo_get_type ()")] +public class Foo : GLib.Object { + [CCode (has_construct_function = false)] + public Foo (); + public virtual signal void signal_virtual (); +}