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



commit 53fa95225c2a70f41f001776babccebf920f6b9b
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 74c51cf83..c6a671ab6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -389,6 +389,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]