]> 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>
Sat, 23 Feb 2019 19:19:31 +0000 (20:19 +0100)
tests/Makefile.am
tests/generics/constructor-chain-up.vala [new file with mode: 0644]

index 6917197fc6f431bec3b7a23b8f34094cd94a2e4b..676da7ea89e0c9f47d27add9be1a84bae1e557b3 100644 (file)
@@ -426,6 +426,7 @@ TESTS = \
        asynchronous/out-parameter-invalid.test \
        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 ();
+}