summaryrefslogtreecommitdiff
path: root/Test/triggers/suppressing-warnings-behaves-properly.dfy
diff options
context:
space:
mode:
authorGravatar leino <unknown>2015-09-11 18:27:23 -0700
committerGravatar leino <unknown>2015-09-11 18:27:23 -0700
commitb9319e38746bc6a2043cb7c979c4ccd4b175b86c (patch)
tree45c298c34a7fd3403a19ffa6049b4fd4eb5499b2 /Test/triggers/suppressing-warnings-behaves-properly.dfy
parent66281ddb041604d1c02d0356b48e38b9ac2c79dc (diff)
parentca96e3974019ca956f46c91eb07b2c2dfede1d29 (diff)
Merge
Diffstat (limited to 'Test/triggers/suppressing-warnings-behaves-properly.dfy')
-rw-r--r--Test/triggers/suppressing-warnings-behaves-properly.dfy21
1 files changed, 21 insertions, 0 deletions
diff --git a/Test/triggers/suppressing-warnings-behaves-properly.dfy b/Test/triggers/suppressing-warnings-behaves-properly.dfy
new file mode 100644
index 00000000..237269e5
--- /dev/null
+++ b/Test/triggers/suppressing-warnings-behaves-properly.dfy
@@ -0,0 +1,21 @@
+// RUN: %dafny /compile:0 /print:"%t.print" /dprint:"%t.dprint" /autoTriggers:1 /printTooltips "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+// This file checks that suppressing warnings works properly
+
+predicate f(x: int)
+predicate g(x: int)
+
+method M() {
+ assert forall n :: n >= 0 || n < 0;
+ assert forall n {:nowarn} :: n >= 0 || n < 0;
+ assert forall n {:autotriggers false} :: n >= 0 || n < 0;
+
+ assert forall n: nat :: (n != 0) == f(n) || true;
+ assert forall n: nat {:nowarn} :: (n != 0) == f(n) || true;
+ assert forall n: nat {:autotriggers false} :: (n != 0) == f(n) || true;
+
+ assert forall n: nat :: f(n) == f(n+1) || g(n) || true;
+ assert forall n: nat {:nowarn} :: (n != 0) == f(n) || true;
+ assert forall n: nat {:autotriggers false} :: (n != 0) == f(n) || true;
+}