]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add "method ccode return-type" test to increase coverage
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 10 Mar 2019 17:14:09 +0000 (18:14 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 10 Mar 2019 17:14:09 +0000 (18:14 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=699956

tests/Makefile.am
tests/methods/bug699956.vala [new file with mode: 0644]

index 77f4da8661a93851647c9325d23e0a9dba299d9f..c48c1a15b2754ce76776b787cfa8820f63630904 100644 (file)
@@ -121,6 +121,7 @@ TESTS = \
        methods/bug653391.vala \
        methods/bug653908.vala \
        methods/bug663210.vala \
+       methods/bug699956.vala \
        methods/bug710862.vala \
        methods/bug723009.vala \
        methods/bug723195.vala \
diff --git a/tests/methods/bug699956.vala b/tests/methods/bug699956.vala
new file mode 100644 (file)
index 0000000..c96b503
--- /dev/null
@@ -0,0 +1,14 @@
+class Foo {
+}
+
+class Bar : Foo {
+}
+
+[CCode (type = "Foo*")]
+Bar? foo () {
+       return null;
+}
+
+void main () {
+       foo ();
+}