diff options
author | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-08-28 20:39:02 -0700 |
---|---|---|
committer | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-08-28 20:39:02 -0700 |
commit | 2db858bf6e72e521b49aa0ae3a993dc943b8c875 (patch) | |
tree | 692ebe07028e35e431e8b93ee35266461126d5cd /Test/triggers/constructors-cause-matching-loops.dfy | |
parent | 3b1c3923a403efbd28b8f5ae6fc4429ccee8c2e8 (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.dfy | 11 |
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);
+}
|