From 43f8f31b602b443e4a9d6a39b803ac04eece9a4a Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Tue, 24 Sep 2019 12:18:00 +0200 Subject: [PATCH] tests: Extent "post-condition" creation method test to increase coverage --- tests/methods/prepostconditions.vala | 6 ++++++ 1 file changed, 6 insertions(+) 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); } -- 2.47.2