summaryrefslogtreecommitdiff
path: root/Test
diff options
context:
space:
mode:
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