summaryrefslogtreecommitdiff
path: root/Test/snapshots/Snapshots41.v1.bpl
diff options
context:
space:
mode:
authorGravatar Rustan Leino <leino@microsoft.com>2015-08-27 20:10:41 -0700
committerGravatar Rustan Leino <leino@microsoft.com>2015-08-28 13:29:56 -0700
commit21f1cfff139759d9b9f91ed800da2158daca8ed4 (patch)
treee9665d1ed7561e244372f167fcc6d90abd32127b /Test/snapshots/Snapshots41.v1.bpl
parent8f64d5c104efe69c5d561c1b22c3e1320bba04fa (diff)
Added /verifySnapshots:3, which prints recycled errors messages with the source locations of the new code.
Diffstat (limited to 'Test/snapshots/Snapshots41.v1.bpl')
-rw-r--r--Test/snapshots/Snapshots41.v1.bpl39
1 files changed, 39 insertions, 0 deletions
diff --git a/Test/snapshots/Snapshots41.v1.bpl b/Test/snapshots/Snapshots41.v1.bpl
new file mode 100644
index 00000000..0cd9fbf9
--- /dev/null
+++ b/Test/snapshots/Snapshots41.v1.bpl
@@ -0,0 +1,39 @@
+procedure {:checksum "0"} M(x: int);
+implementation {:id "M"} {:checksum "1"} M(x: int)
+{
+assert x < 20 || 10 <= x; // always true
+
+ assert x < 10; // error
+ call Other(x); // error: precondition violation
+ assert x == 7; // error: this is a new error in v1
+}
+
+
+ procedure {:checksum "10"} Other(y: int);
+ requires 0 <= y;
+ implementation {:id "Other"} {:checksum "11"} Other(y: int)
+ {
+ }
+
+
+
+procedure {:checksum "20"} Posty() returns (z: int);
+ ensures 2 <= z; // error: postcondition violation
+implementation {:id "Posty"} {:checksum "21"} Posty() returns (z: int)
+{
+ var t: int;
+ t := 20;
+ if (t < z) {
+ assert true; // this is a new assert
+ } else { // the postcondition violation occurs on this 'else' branch
+ }
+}
+
+ procedure {:checksum "30"} NoChangeWhazzoeva(u: int);
+ implementation {:id "NoChangeWhazzoeva"} {:checksum "3"} NoChangeWhazzoeva(u: int)
+ {
+ assert u != 53; // error
+ }
+
+procedure {:checksum "40"} NoChangeAndCorrect();
+implementation {:id "NoChangeAndCorrect"} {:checksum "41"} NoChangeAndCorrect() { assert true; }