From: Rico Tzschichholz Date: Sat, 14 Nov 2020 20:31:03 +0000 (+0100) Subject: tests: Add "constructor with inner error" test to increase coverage X-Git-Tag: 0.51.1~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3756a1621a2560c78a0ee490f36c7f350d69b208;p=thirdparty%2Fvala.git tests: Add "constructor with inner error" test to increase coverage --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 2b3061793..5564de03f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -408,6 +408,7 @@ TESTS = \ objects/compact-class-refcount.vala \ objects/compact-class-custom-ref.vala \ objects/constructor-abstract-public.test \ + objects/constructor-inner-error.vala \ objects/constructor-variadic.test \ objects/constructor-wrong-name.test \ objects/constructors.vala \ diff --git a/tests/objects/constructor-inner-error.vala b/tests/objects/constructor-inner-error.vala new file mode 100644 index 000000000..896ffe976 --- /dev/null +++ b/tests/objects/constructor-inner-error.vala @@ -0,0 +1,24 @@ +void bar () throws Error { +} + +class Foo : Object { + public Foo () throws Error { + bar (); + } + + construct { + bar (); + } + + class construct { + bar (); + } + + static construct { + bar (); + } +} + +void main () { + var foo = new Foo (); +}