From 24cce2bc8b6414b6d8fd1989e4d7ce8d04a41298 Mon Sep 17 00:00:00 2001 From: qunyanm Date: Wed, 2 Dec 2015 12:43:55 -0800 Subject: Add the test for Bug88. --- Test/dafny4/Bug88.dfy | 18 ++++++++++++++++++ Test/dafny4/Bug88.dfy.expect | 11 +++++++++++ 2 files changed, 29 insertions(+) create mode 100644 Test/dafny4/Bug88.dfy create mode 100644 Test/dafny4/Bug88.dfy.expect 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 -- cgit v1.2.3