[vala/0.40] tests: Extent "post-condition" creation method test to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.40] tests: Extent "post-condition" creation method test to increase coverage
- Date: Wed, 9 Oct 2019 17:34:35 +0000 (UTC)
commit 3c2db54932880f523768bb3b3b31f57b780c6490
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]