From b488cd24bb6e32aacc437a083dbdcc6b62ab3800 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Sat, 23 Feb 2019 20:19:31 +0100 Subject: [PATCH] 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(+) create mode 100644 tests/generics/constructor-chain-up.vala diff --git a/tests/Makefile.am b/tests/Makefile.am index 6917197fc..676da7ea8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 index 000000000..9256b2f32 --- /dev/null +++ b/tests/generics/constructor-chain-up.vala @@ -0,0 +1,12 @@ +class Foo : Object { + public Foo () { + } + + public Foo.bar () { + this (); + } +} + +void main () { + var foo = new Foo.bar (); +} -- 2.47.2