[vala/0.44] tests: Extent "post-condition" creation method test to increase coverage



commit 43f8f31b602b443e4a9d6a39b803ac04eece9a4a
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Tue Sep 24 12:18:00 2019 +0200

    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);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]