summaryrefslogtreecommitdiff
path: root/Test/dafny0/Includee.dfy
diff options
context:
space:
mode:
authorGravatar Rustan Leino <unknown>2014-04-19 20:00:12 -0700
committerGravatar Rustan Leino <unknown>2014-04-19 20:00:12 -0700
commitb56d76455f4f692ae609cffd3c0916d05b55f9ee (patch)
tree360e5124015f14c360db76fe8861b7bc8b08a0c6 /Test/dafny0/Includee.dfy
parentf73fd1028aad4b84fc445c1ef6ee39b08ee252a4 (diff)
Members included from different files are now internally marked with an IncludeToken; the previous scheme of using {:verify false} is no longer used. This makes "include" work with refinement features.
Filenames of included files used in error messages are now what the user wrote, rather than absolute paths (which not only don't look so good, but are also problematic in comparing test output on different machines). Added dafny0/Includee.dfy to the test suite as well -- might as well include it, too, to get checked.
Diffstat (limited to 'Test/dafny0/Includee.dfy')
-rw-r--r--Test/dafny0/Includee.dfy18
1 files changed, 17 insertions, 1 deletions
diff --git a/Test/dafny0/Includee.dfy b/Test/dafny0/Includee.dfy
index 303e8dd4..6d2e17e0 100644
--- a/Test/dafny0/Includee.dfy
+++ b/Test/dafny0/Includee.dfy
@@ -1,10 +1,26 @@
method m_unproven(x:int) returns (y:int)
ensures y == 2*x;
-{
+{ // error: postcondition violation
}
function f(x:int) : int
{
2*x
}
+
+abstract module Abstract
+{
+ function method inc(x:int) :int
+ ensures inc(x) > x;
+
+ method M(x: int) returns (r: int)
+ ensures r == x;
+ { // error: postcondition violation
+ var y :| 0 <= y;
+ r := x + 3;
+ assert r % 3 == 0; // error
+ }
+
+ function method G(x: int): int
+}