diff options
author | wuestholz <unknown> | 2013-11-18 21:46:01 +0100 |
---|---|---|
committer | wuestholz <unknown> | 2013-11-18 21:46:01 +0100 |
commit | f862bd100e2d0696962339412bb056f7191a1d91 (patch) | |
tree | 1b8b50def4aab7743a6d2bbc022e345d55b1a6f8 /Test/dafny0/SmallTests.dfy | |
parent | 0975663860053e1ed568b971abb1e0d25cc48f3a (diff) |
Added support for attributes on variable declarations.
Diffstat (limited to 'Test/dafny0/SmallTests.dfy')
-rw-r--r-- | Test/dafny0/SmallTests.dfy | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Test/dafny0/SmallTests.dfy b/Test/dafny0/SmallTests.dfy index 75a42200..b3107bcb 100644 --- a/Test/dafny0/SmallTests.dfy +++ b/Test/dafny0/SmallTests.dfy @@ -190,7 +190,7 @@ class AllocatedTests { {
var n := new Node;
var t := S + {n};
-
+
if (*) {
assert !fresh(n); // error: n was not allocated in the initial state
} else {
@@ -498,6 +498,16 @@ class AttributeTests { }
}
+// ----------------------- test attributes on variable declarations --------
+
+static method TestAttributesVarDecls()
+{
+ var {:foo} foo;
+ var {:bar} bar := 0;
+ var {:foo} {:bar} foobar := {};
+ var {:baz} baz, {:foobaz} foobaz := true, false;
+}
+
// ----------------------- Pretty printing of !(!expr) --------
static method TestNotNot()
|