summaryrefslogtreecommitdiff
path: root/Test
diff options
context:
space:
mode:
authorGravatar wuestholz <unknown>2015-01-02 18:12:15 +0100
committerGravatar wuestholz <unknown>2015-01-02 18:12:15 +0100
commit83ce1429f2897d10e36ecbb49751429674302745 (patch)
tree4c0340f75ca9a64312df50e972c0ee2c08a4930e /Test
parentd3662f29ba04d5d36cce49bd90b937c0d3d29a44 (diff)
Added a test and a todo.
Diffstat (limited to 'Test')
-rw-r--r--Test/test2/AssertVerifiedUnder0.bpl39
-rw-r--r--Test/test2/AssertVerifiedUnder0.bpl.expect11
2 files changed, 50 insertions, 0 deletions
diff --git a/Test/test2/AssertVerifiedUnder0.bpl b/Test/test2/AssertVerifiedUnder0.bpl
new file mode 100644
index 00000000..9e82545f
--- /dev/null
+++ b/Test/test2/AssertVerifiedUnder0.bpl
@@ -0,0 +1,39 @@
+// RUN: %boogie -noinfer "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+procedure Test0()
+{
+ assert {:verified_under false} false; // error
+}
+
+
+procedure Test1()
+{
+ assert {:verified_under true} false;
+}
+
+
+procedure Test2(P: bool, A: bool)
+{
+ assert {:verified_under A} P; // error
+}
+
+
+procedure Test3(P: bool, A: bool)
+ requires !A ==> P;
+{
+ assert {:verified_under A} P;
+}
+
+
+procedure Test4(P: bool, A: bool)
+{
+ assert {:verified_under A} {:verified_under true} P; // error
+}
+
+
+procedure Test5(P: bool, A: bool)
+ requires !A ==> P;
+{
+ assert {:verified_under A} {:verified_under true} P;
+}
diff --git a/Test/test2/AssertVerifiedUnder0.bpl.expect b/Test/test2/AssertVerifiedUnder0.bpl.expect
new file mode 100644
index 00000000..83016c63
--- /dev/null
+++ b/Test/test2/AssertVerifiedUnder0.bpl.expect
@@ -0,0 +1,11 @@
+AssertVerifiedUnder0.bpl(6,5): Error BP5001: This assertion might not hold.
+Execution trace:
+ AssertVerifiedUnder0.bpl(6,5): anon0
+AssertVerifiedUnder0.bpl(18,5): Error BP5001: This assertion might not hold.
+Execution trace:
+ AssertVerifiedUnder0.bpl(18,5): anon0
+AssertVerifiedUnder0.bpl(31,5): Error BP5001: This assertion might not hold.
+Execution trace:
+ AssertVerifiedUnder0.bpl(31,5): anon0
+
+Boogie program verifier finished with 3 verified, 3 errors