]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add "constructor chain up" generics test to increase coverage
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 23 Feb 2019 19:19:31 +0000 (20:19 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 26 Feb 2019 16:53:41 +0000 (17:53 +0100)
tests/Makefile.am
tests/generics/constructor-chain-up.vala [new file with mode: 0644]

index b5fe150f86f3b54f331a5b69c858ea74fc1e38a3..5b086983e4f529e4906a940a29996ff21541e74d 100644 (file)
@@ -405,6 +405,7 @@ TESTS = \
        asynchronous/generator.vala \
        asynchronous/result-pos.vala \
        asynchronous/yield.vala \
+       generics/constructor-chain-up.vala \
        generics/bug640330.test \
        generics/bug640330.vala \
        generics/bug694765-1.vala \
diff --git a/tests/generics/constructor-chain-up.vala b/tests/generics/constructor-chain-up.vala
new file mode 100644 (file)
index 0000000..9256b2f
--- /dev/null
@@ -0,0 +1,12 @@
+class Foo<G> : Object {
+       public Foo () {
+       }
+
+       public Foo.bar () {
+               this ();
+       }
+}
+
+void main () {
+       var foo = new Foo<string>.bar ();
+}