summaryrefslogtreecommitdiff
path: root/Test
diff options
context:
space:
mode:
authorGravatar qunyanm <unknown>2015-03-06 14:42:25 -0800
committerGravatar qunyanm <unknown>2015-03-06 14:42:25 -0800
commit13b3fc763b1d5ab070eb4583bbca342ec0582ac4 (patch)
treed91568f1b098499138c57848b75e42d36ce36a1d /Test
parentdb30cafd94527e73e969457c9c00e8c67300d7d4 (diff)
Fix issue #60
Diffstat (limited to 'Test')
-rw-r--r--Test/dafny4/Bug60.dfy13
-rw-r--r--Test/dafny4/Bug60.dfy.expect9
2 files changed, 22 insertions, 0 deletions
diff --git a/Test/dafny4/Bug60.dfy b/Test/dafny4/Bug60.dfy
new file mode 100644
index 00000000..5340ad6b
--- /dev/null
+++ b/Test/dafny4/Bug60.dfy
@@ -0,0 +1,13 @@
+// RUN: %dafny /compile:3 "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+// This method can be used to test compilation.
+method Main()
+{
+ var s := {2, 3};
+ var m := map[2 := 20, 3 := 30];
+ print (s, m), "\n";
+ print (|s|, |m|), "\n";
+ print(set s | s in m), "\n";
+ print (forall x :: x in (map [1:=10, 2:=20]) ==> x > 0), "\n";
+} \ No newline at end of file
diff --git a/Test/dafny4/Bug60.dfy.expect b/Test/dafny4/Bug60.dfy.expect
new file mode 100644
index 00000000..3dccafa1
--- /dev/null
+++ b/Test/dafny4/Bug60.dfy.expect
@@ -0,0 +1,9 @@
+
+Dafny program verifier finished with 2 verified, 0 errors
+Program compiled successfully
+Running...
+
+({2, 3}, map[2 := 20, 3 := 30])
+(2, 2)
+{2, 3}
+True