From: Rico Tzschichholz Date: Thu, 4 Mar 2021 18:12:15 +0000 (+0100) Subject: tests: Add more "gir" tests to increase coverage X-Git-Tag: 0.51.90~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6875fb4c5c71ffa1b0467bae7894c563cd880f9;p=thirdparty%2Fvala.git tests: Add more "gir" tests to increase coverage --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 03b3e5647..f88774926 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -728,6 +728,8 @@ TESTS = \ gir/gtype-struct-name.test \ gir/instance-parameter-owned.test \ gir/method-array-length-type.test \ + gir/method-class.test \ + gir/method-nowrapper.test \ gir/parameter-array-length-type.test \ gir/parameter-nullable-out-simple-type.test \ gir/property-non-readable.test \ diff --git a/tests/gir/method-class.test b/tests/gir/method-class.test new file mode 100644 index 000000000..adb7ec105 --- /dev/null +++ b/tests/gir/method-class.test @@ -0,0 +1,41 @@ +GIR + +Input: + + + + + + + + + + + + + + + + + + + +Output: + +[CCode (cheader_filename = "test.h", type_id = "test_foo_get_type ()")] +public abstract class Foo : GLib.Object { + [CCode (has_construct_function = false)] + protected Foo (); + [CCode (cname = "test_foo_class_bar")] + public class void bar (); +} diff --git a/tests/gir/method-nowrapper.test b/tests/gir/method-nowrapper.test new file mode 100644 index 000000000..ed2c1deca --- /dev/null +++ b/tests/gir/method-nowrapper.test @@ -0,0 +1,51 @@ +GIR + +Input: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Output: + +[CCode (cheader_filename = "test.h", type_id = "test_foo_get_type ()")] +public abstract class Foo : GLib.Object { + [CCode (has_construct_function = false)] + protected Foo (); + [NoWrapper] + public virtual bool bar (); +}