diff options
author | Rustan Leino <leino@microsoft.com> | 2011-05-27 19:15:56 -0700 |
---|---|---|
committer | Rustan Leino <leino@microsoft.com> | 2011-05-27 19:15:56 -0700 |
commit | 2dc9d6117b1a6ab03c339f725d5232881e8f8d16 (patch) | |
tree | 733ed2cd776f848d070e242df581cdfc8177ccd1 /Test/dafny0/Basics.dfy | |
parent | 803f42612314d2d27f20dfa476bf0ff8ed24d958 (diff) |
Dafny:
* fixed bug in allowing ghost out-parameters of ghost methods
* added test case for verifying calls of the form MyClass.M(...)
Diffstat (limited to 'Test/dafny0/Basics.dfy')
-rw-r--r-- | Test/dafny0/Basics.dfy | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Test/dafny0/Basics.dfy b/Test/dafny0/Basics.dfy index c02f2c45..16fd7d87 100644 --- a/Test/dafny0/Basics.dfy +++ b/Test/dafny0/Basics.dfy @@ -1,6 +1,6 @@ class Global {
static function G(x: int): int { x+x }
- static method N(x: int) returns (ghost r: int)
+ static method N(ghost x: int) returns (ghost r: int)
ensures r == Global.G(x);
{
if {
@@ -23,8 +23,8 @@ method TestCalls(k: nat) { ghost var r: int;
ghost var s := Global.G(k);
-// r := Global.N(k);
-// assert r == s;
+ r := Global.N(k);
+ assert r == s;
r := g.N(k);
assert r == s;
@@ -35,11 +35,11 @@ method TestCalls(k: nat) { r := g.N(k);
assert r == s;
-// r := Global.N(r);
+ r := Global.N(r);
if (k == 0) {
assert r == s;
} else {
-// assert r == s; // error: G(k) and G(k+k) are different
+ assert r == s; // error: G(k) and G(k+k) are different
}
}
|