summaryrefslogtreecommitdiff
path: root/Test/hofs/TreeMapSimple.dfy
diff options
context:
space:
mode:
Diffstat (limited to 'Test/hofs/TreeMapSimple.dfy')
-rw-r--r--Test/hofs/TreeMapSimple.dfy8
1 files changed, 7 insertions, 1 deletions
diff --git a/Test/hofs/TreeMapSimple.dfy b/Test/hofs/TreeMapSimple.dfy
index e717b096..3c70840e 100644
--- a/Test/hofs/TreeMapSimple.dfy
+++ b/Test/hofs/TreeMapSimple.dfy
@@ -1,4 +1,4 @@
-// RUN: %dafny "%s" > "%t"
+// RUN: %dafny /compile:3 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
datatype List<A> = Nil | Cons(head: A,tail: List<A>);
@@ -47,3 +47,9 @@ function method TMap(t0 : Tree<A>, f : A -> B) : Tree<B>
=> TMap(t,f)))
}
+method Main()
+{
+ var t := TMap(Branch(1,Cons(Branch(2,Nil),Nil)), x requires x != 0 => 100 / x);
+ assert t == Branch(100,Cons(Branch(50,Nil),Nil));
+ print t, "\n";
+}