Skip to content

Commit

Permalink
Merge pull request #683 from viperproject/carbon_pr_457
Browse files Browse the repository at this point in the history
Update tests for Carbon exhale with well-definedness change (Carbon PR viperproject/carbon#457)
  • Loading branch information
gauravpartha authored Apr 25, 2023
2 parents 8101fe1 + 1383e0f commit ae4a123
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/test/resources/all/issues/carbon/0213.vpr
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ method test(r:Ref)
requires P(r)
{
assert perm(r.next) == none
//:: UnexpectedOutput(assert.failed:assertion.false, /carbon/issue/213/)
assert (unfolding P(r) in perm(r.next) == write)
}
24 changes: 24 additions & 0 deletions src/test/resources/all/issues/carbon/0406.vpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
field f: Ref

method m1() {
var y: Ref
var z: Ref
inhale acc(y.f) && acc(z.f)
exhale acc(y.f) && forperm x: Ref [x.f] :: x != z ==> 0/0 == 0/0
}

method m2() {
var x: Ref

inhale acc(x.f)

//:: ExpectedOutput(exhale.failed:division.by.zero)
exhale acc(x.f) && (perm(x.f) == none ==> 0/0 == 0/0)
}

method m3() {
var x: Ref

inhale acc(x.f)
exhale acc(x.f) && (perm(x.f) != none ==> 0/0 == 0/0)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/publicdomain/zero/1.0/

//:: IgnoreFile(/carbon/issue/280/)

/*****************************************************************
* List Nodes
*****************************************************************/
Expand Down

0 comments on commit ae4a123

Please sign in to comment.