From: Rico Tzschichholz Date: Tue, 24 Sep 2019 10:18:00 +0000 (+0200) Subject: tests: Extent "post-condition" creation method test to increase coverage X-Git-Tag: 0.44.9~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43f8f31b602b443e4a9d6a39b803ac04eece9a4a;p=thirdparty%2Fvala.git tests: Extent "post-condition" creation method test to increase coverage --- diff --git a/tests/methods/prepostconditions.vala b/tests/methods/prepostconditions.vala index 214c4800a..0ae57e054 100644 --- a/tests/methods/prepostconditions.vala +++ b/tests/methods/prepostconditions.vala @@ -5,6 +5,9 @@ class Foo { public Foo () requires (required = true) { } + public Foo.post () ensures (ensured = true) { + } + public void foo () ensures (ensured = true) { } @@ -50,4 +53,7 @@ void main () { assert(foo.bar_pre (4711) == 4711); assert (foo.faz (42) == 42); assert (foo.faz_pre (4711) == 4711); + + var foo2 = new Foo.post (); + assert (foo2.ensured); }