Skip to content

Commit

Permalink
Adding test for Carbon issue #420 (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoeilers authored Feb 11, 2025
1 parent e41ab2b commit dbb955d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/test/resources/all/issues/carbon/0420.vpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Any copyright is dedicated to the Public Domain.^M
// http://creativecommons.org/publicdomain/zero/1.0/^M

domain MyInt {
function succ(n: MyInt): MyInt
function pred(n: MyInt): MyInt

axiom ps{
forall n:MyInt ::
{ pred(succ(n)) }
pred(succ(n)) == n
}
}

method test(n: MyInt, m: MyInt)
requires succ(n) == succ(m)
ensures n == m {
if (pred(succ(n)) != n) {

}
}

0 comments on commit dbb955d

Please sign in to comment.