Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests for Carbon exhale with well-definedness change #683

Merged
merged 3 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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