Skip to content

Commit

Permalink
Add UnexpectedOutput annotations for Carbon.
Browse files Browse the repository at this point in the history
  • Loading branch information
manud99 committed May 13, 2024
1 parent 2f700d3 commit 6374709
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/test/resources/wands/snap_functions/test01.vpr
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ method test01a(x: Ref)

package true --* acc(x.b)

//:: UnexpectedOutput(exhale.failed:insufficient.permission, /Carbon/issue/488/)
assert applying (true --* acc(x.b)) in x.b
}

Expand All @@ -26,6 +27,7 @@ method test01c(x: Ref)

package true --* acc(x.b)

//:: UnexpectedOutput(exhale.failed:insufficient.permission, /Carbon/issue/488/)
assert applying (true --* acc(x.b)) in x.b

apply true --* acc(x.b)
Expand All @@ -39,6 +41,7 @@ method test01d(x: Ref, a: Bool)

package true --* acc(x.b)

//:: UnexpectedOutput(exhale.failed:insufficient.permission, /Carbon/issue/488/)
assert applying (true --* acc(x.b)) in x.b == a

apply true --* acc(x.b)
Expand Down
3 changes: 3 additions & 0 deletions src/test/resources/wands/snap_functions/test02.vpr
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ method test02a(x: Ref)

package true --* acc(x.f)

//:: UnexpectedOutput(exhale.failed:insufficient.permission, /Carbon/issue/488/)
assert applying (true --* acc(x.f)) in x.f == 42
}

Expand All @@ -26,6 +27,7 @@ method test02c(x: Ref)

package true --* acc(x.f)

//:: UnexpectedOutput(exhale.failed:insufficient.permission, /Carbon/issue/488/)
assert applying (true --* acc(x.f)) in x.f == 42

apply true --* acc(x.f)
Expand All @@ -39,6 +41,7 @@ method test02d(x: Ref, a: Int)

package true --* acc(x.f)

//:: UnexpectedOutput(exhale.failed:insufficient.permission, /Carbon/issue/488/)
assert applying (true --* acc(x.f)) in x.f == a

apply true --* acc(x.f)
Expand Down
3 changes: 3 additions & 0 deletions src/test/resources/wands/snap_functions/test04.vpr
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ method test04a(x: Ref, y: Ref)

package acc(x.f) --* acc(x.f) && acc(y.f)

//:: UnexpectedOutput(exhale.failed:insufficient.permission, /Carbon/issue/488/)
assert applying (acc(x.f) --* acc(x.f) && acc(y.f)) in x.f == 42 && y.f == 37
}

Expand All @@ -26,6 +27,7 @@ method test04c(x: Ref, y: Ref)

package acc(x.f) --* acc(x.f) && acc(y.f)

//:: UnexpectedOutput(exhale.failed:insufficient.permission, /Carbon/issue/488/)
assert applying (acc(x.f) --* acc(x.f) && acc(y.f)) in x.f == 42 && y.f == 37

apply acc(x.f) --* acc(x.f) && acc(y.f)
Expand All @@ -39,6 +41,7 @@ method test04d(x: Ref, y: Ref, a: Int, b: Int)

package acc(x.f) --* acc(x.f) && acc(y.f)

//:: UnexpectedOutput(exhale.failed:insufficient.permission, /Carbon/issue/488/)
assert applying (acc(x.f) --* acc(x.f) && acc(y.f)) in x.f == a && y.f == b

apply acc(x.f) --* acc(x.f) && acc(y.f)
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/wands/snap_functions/test09.vpr
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ method test09a(x: Ref, y: Ref)
requires acc(x.f) && x.f == 42
requires acc(x.f) --* acc(x.f) && acc(y.f) && y.f == 37
{
//:: UnexpectedOutput(exhale.failed:insufficient.permission, /Carbon/issue/488/)
assert applying (acc(x.f) --* acc(x.f) && acc(y.f) && y.f == 37) in y.f == 37
}

Expand Down
1 change: 1 addition & 0 deletions src/test/resources/wands/snap_functions/test10.vpr
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ method test10b(x: Ref)

apply acc(x.f) --* foo(x)

//:: UnexpectedOutput(assert.failed:assertion.false, /Carbon/issue/216/)
assert foo(x) && unfolding foo(x) in x.f == 42
}
2 changes: 2 additions & 0 deletions src/test/resources/wands/snap_functions/test11.vpr
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function sorted(start: Ref) : Bool

method append_it(l1 : Ref, l2: Ref)
requires List(l1) && List(l2) && l2 != null
//:: UnexpectedOutput(assert.failed:assertion.false, /Carbon/issue/000/)
ensures List(l1) && elems(l1) == old(elems(l1) ++ elems(l2))
{
unfold List(l1)
Expand Down Expand Up @@ -54,6 +55,7 @@ method append_it(l1 : Ref, l2: Ref)
tmp := tmp.next
index := index + 1

//:: UnexpectedOutput(assert.failed:assertion.false, /Carbon/issue/000/)
package List(tmp) --* List(l1) && elems(l1) == old(elems(l1)[..index]) ++ old[lhs](elems(tmp))
{
fold List(prev)
Expand Down

0 comments on commit 6374709

Please sign in to comment.