summaryrefslogtreecommitdiff
path: root/Test/dafny0/SmallTests.dfy
diff options
context:
space:
mode:
authorGravatar Rustan Leino <leino@microsoft.com>2011-06-29 16:49:45 -0700
committerGravatar Rustan Leino <leino@microsoft.com>2011-06-29 16:49:45 -0700
commit3a87ca70392a4b8d8d5bcdd8ed921cfdfc47452c (patch)
treefc6a712ed07a20474b4bf67139356400a1f82eb7 /Test/dafny0/SmallTests.dfy
parent7d2f33521d99c25f3664ec24412154c127f08dfe (diff)
Dafny: Fixed axioms for Seq#Contains vs. the sequence building functions
Diffstat (limited to 'Test/dafny0/SmallTests.dfy')
-rw-r--r--Test/dafny0/SmallTests.dfy16
1 files changed, 16 insertions, 0 deletions
diff --git a/Test/dafny0/SmallTests.dfy b/Test/dafny0/SmallTests.dfy
index ac7286e9..8393b1c7 100644
--- a/Test/dafny0/SmallTests.dfy
+++ b/Test/dafny0/SmallTests.dfy
@@ -330,3 +330,19 @@ class SomeType
}
}
}
+
+// ----------------------- tests of some theory axioms --------
+
+method TestSequences0()
+{
+ var s := [0, 2, 4];
+ if (*) {
+ assert 4 in s;
+ assert 0 in s;
+ assert 1 !in s;
+ } else {
+ assert 2 in s;
+ assert exists n :: n in s && -3 <= n && n < 2;
+ }
+ assert 7 in s; // error
+}