summaryrefslogtreecommitdiff
path: root/Test/triggers/constructors-cause-matching-loops.dfy
diff options
context:
space:
mode:
authorGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2015-08-28 20:39:02 -0700
committerGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2015-08-28 20:39:02 -0700
commit2db858bf6e72e521b49aa0ae3a993dc943b8c875 (patch)
tree692ebe07028e35e431e8b93ee35266461126d5cd /Test/triggers/constructors-cause-matching-loops.dfy
parent3b1c3923a403efbd28b8f5ae6fc4429ccee8c2e8 (diff)
Implement {:nowarn}, clarify some messages, and add a few tests
Diffstat (limited to 'Test/triggers/constructors-cause-matching-loops.dfy')
-rw-r--r--Test/triggers/constructors-cause-matching-loops.dfy11
1 files changed, 11 insertions, 0 deletions
diff --git a/Test/triggers/constructors-cause-matching-loops.dfy b/Test/triggers/constructors-cause-matching-loops.dfy
new file mode 100644
index 00000000..61e6a66b
--- /dev/null
+++ b/Test/triggers/constructors-cause-matching-loops.dfy
@@ -0,0 +1,11 @@
+// RUN: %dafny /compile:0 /print:"%t.print" /dprint:"%t.dprint" /autoTriggers:1 /printTooltips "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+// This file is just a small test to check that constructors do cause loops
+
+datatype Nat = Zero | Succ(x: Nat)
+function f(n: Nat): Nat
+
+method M() {
+ assert forall s :: true || f(Succ(s)) == f(s);
+}