Skip to content

Commit dbb955d

Browse files
authored
Adding test for Carbon issue #420 (#845)
1 parent e41ab2b commit dbb955d

File tree

1 file changed

+21
-0
lines changed
  • src/test/resources/all/issues/carbon

1 file changed

+21
-0
lines changed

Diff for: src/test/resources/all/issues/carbon/0420.vpr

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Any copyright is dedicated to the Public Domain.^M
2+
// http://creativecommons.org/publicdomain/zero/1.0/^M
3+
4+
domain MyInt {
5+
function succ(n: MyInt): MyInt
6+
function pred(n: MyInt): MyInt
7+
8+
axiom ps{
9+
forall n:MyInt ::
10+
{ pred(succ(n)) }
11+
pred(succ(n)) == n
12+
}
13+
}
14+
15+
method test(n: MyInt, m: MyInt)
16+
requires succ(n) == succ(m)
17+
ensures n == m {
18+
if (pred(succ(n)) != n) {
19+
20+
}
21+
}

0 commit comments

Comments
 (0)