summaryrefslogtreecommitdiff
path: root/Test/snapshots
diff options
context:
space:
mode:
authorGravatar wuestholz <unknown>2014-07-06 22:29:26 +0200
committerGravatar wuestholz <unknown>2014-07-06 22:29:26 +0200
commit40efa1496ae36400e0f334a215b86371a56a6b9c (patch)
tree49a7949bff9797dbc3955af8fe9b6e744353c2ba /Test/snapshots
parentbb6e253feab04cc13de3132520eac3ffc8150f01 (diff)
Worked on adding support for "canned errors".
Diffstat (limited to 'Test/snapshots')
-rw-r--r--Test/snapshots/Snapshots20.v0.bpl20
-rw-r--r--Test/snapshots/Snapshots20.v1.bpl20
-rw-r--r--Test/snapshots/runtest.snapshot2
-rw-r--r--Test/snapshots/runtest.snapshot.expect16
4 files changed, 57 insertions, 1 deletions
diff --git a/Test/snapshots/Snapshots20.v0.bpl b/Test/snapshots/Snapshots20.v0.bpl
new file mode 100644
index 00000000..54934a05
--- /dev/null
+++ b/Test/snapshots/Snapshots20.v0.bpl
@@ -0,0 +1,20 @@
+procedure {:checksum "0"} M();
+
+implementation {:id "M"} {:checksum "1"} M()
+{
+ if (*)
+ {
+ call N();
+
+ assert 1 != 1;
+ }
+ else
+ {
+ assert 2 != 2; // error
+ }
+
+ assert 3 != 3;
+}
+
+procedure {:checksum "2"} N();
+ ensures 0 != 0;
diff --git a/Test/snapshots/Snapshots20.v1.bpl b/Test/snapshots/Snapshots20.v1.bpl
new file mode 100644
index 00000000..04fd0a6e
--- /dev/null
+++ b/Test/snapshots/Snapshots20.v1.bpl
@@ -0,0 +1,20 @@
+procedure {:checksum "0"} M();
+
+implementation {:id "M"} {:checksum "1"} M()
+{
+ if (*)
+ {
+ call N();
+
+ assert 1 != 1; // error
+ }
+ else
+ {
+ assert 2 != 2; // error
+ }
+
+ assert 3 != 3;
+}
+
+procedure {:checksum "3"} N();
+ ensures 0 == 0;
diff --git a/Test/snapshots/runtest.snapshot b/Test/snapshots/runtest.snapshot
index b36e1aa2..57ca7f5a 100644
--- a/Test/snapshots/runtest.snapshot
+++ b/Test/snapshots/runtest.snapshot
@@ -1,2 +1,2 @@
-// RUN: %boogie -verifySnapshots:2 -verifySeparately Snapshots0.bpl Snapshots1.bpl Snapshots2.bpl Snapshots3.bpl Snapshots4.bpl Snapshots5.bpl Snapshots6.bpl Snapshots7.bpl Snapshots8.bpl Snapshots9.bpl Snapshots10.bpl Snapshots11.bpl Snapshots12.bpl Snapshots13.bpl Snapshots14.bpl Snapshots15.bpl Snapshots16.bpl Snapshots17.bpl Snapshots18.bpl Snapshots19.bpl > "%t"
+// RUN: %boogie -verifySnapshots:2 -verifySeparately Snapshots0.bpl Snapshots1.bpl Snapshots2.bpl Snapshots3.bpl Snapshots4.bpl Snapshots5.bpl Snapshots6.bpl Snapshots7.bpl Snapshots8.bpl Snapshots9.bpl Snapshots10.bpl Snapshots11.bpl Snapshots12.bpl Snapshots13.bpl Snapshots14.bpl Snapshots15.bpl Snapshots16.bpl Snapshots17.bpl Snapshots18.bpl Snapshots19.bpl Snapshots20.bpl > "%t"
// RUN: %diff "%s.expect" "%t"
diff --git a/Test/snapshots/runtest.snapshot.expect b/Test/snapshots/runtest.snapshot.expect
index 554837e6..7b9241d8 100644
--- a/Test/snapshots/runtest.snapshot.expect
+++ b/Test/snapshots/runtest.snapshot.expect
@@ -190,3 +190,19 @@ Execution trace:
Snapshots19.v1.bpl(5,5): anon0
Boogie program verifier finished with 0 verified, 1 error
+Snapshots20.v0.bpl(13,9): Error BP5001: This assertion might not hold.
+Execution trace:
+ Snapshots20.v0.bpl(5,5): anon0
+ Snapshots20.v0.bpl(13,9): anon4_Else
+
+Boogie program verifier finished with 0 verified, 1 error
+Snapshots20.v1.bpl(9,9): Error BP5001: This assertion might not hold.
+Execution trace:
+ Snapshots20.v1.bpl(5,5): anon0
+ Snapshots20.v1.bpl(7,9): anon4_Then
+Snapshots20.v1.bpl(13,9): Error BP5001: This assertion might not hold.
+Execution trace:
+ Snapshots20.v1.bpl(5,5): anon0
+ Snapshots20.v1.bpl(13,9): anon4_Else
+
+Boogie program verifier finished with 0 verified, 2 errors