summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar qunyanm <unknown>2015-12-02 12:43:55 -0800
committerGravatar qunyanm <unknown>2015-12-02 12:43:55 -0800
commit24cce2bc8b6414b6d8fd1989e4d7ce8d04a41298 (patch)
tree969b4fa336db6631bab023a93529d96e3b9b1315
parentf7ab307779e4d21d706be13acad670d63d0e6537 (diff)
Add the test for Bug88.
-rw-r--r--Test/dafny4/Bug88.dfy18
-rw-r--r--Test/dafny4/Bug88.dfy.expect11
2 files changed, 29 insertions, 0 deletions
diff --git a/Test/dafny4/Bug88.dfy b/Test/dafny4/Bug88.dfy
new file mode 100644
index 00000000..cab2524a
--- /dev/null
+++ b/Test/dafny4/Bug88.dfy
@@ -0,0 +1,18 @@
+// RUN: %dafny "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+lemma T(a: int) returns (b: int)
+ ensures a == b
+{
+ calc {
+ a;
+ }
+}
+
+lemma A(i: int)
+ ensures false
+{
+ if * {
+ } else {
+ }
+} \ No newline at end of file
diff --git a/Test/dafny4/Bug88.dfy.expect b/Test/dafny4/Bug88.dfy.expect
new file mode 100644
index 00000000..3bd22329
--- /dev/null
+++ b/Test/dafny4/Bug88.dfy.expect
@@ -0,0 +1,11 @@
+Bug88.dfy(6,0): Error BP5003: A postcondition might not hold on this return path.
+Bug88.dfy(5,12): Related location: This is the postcondition that might not hold.
+Execution trace:
+ (0,0): anon0
+ Bug88.dfy(7,3): anon2_Else
+Bug88.dfy(14,0): Error BP5003: A postcondition might not hold on this return path.
+Bug88.dfy(13,10): Related location: This is the postcondition that might not hold.
+Execution trace:
+ (0,0): anon0
+
+Dafny program verifier finished with 2 verified, 2 errors