[vala/0.42] tests: Add "constructor chain up" generics test to increase coverage



commit 134cff079defb80deee8077e2b602e8d69add72e
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Feb 23 20:19:31 2019 +0100

    tests: Add "constructor chain up" generics test to increase coverage

 tests/Makefile.am                        |  1 +
 tests/generics/constructor-chain-up.vala | 12 ++++++++++++
 2 files changed, 13 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index b5fe150f8..5b086983e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -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
index 000000000..9256b2f32
--- /dev/null
+++ b/tests/generics/constructor-chain-up.vala
@@ -0,0 +1,12 @@
+class Foo<G> : Object {
+       public Foo () {
+       }
+
+       public Foo.bar () {
+               this ();
+       }
+}
+
+void main () {
+       var foo = new Foo<string>.bar ();
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]