Skip to content

Commit e03049d

Browse files
committed
adapts the existing assertby testcases accordingly
1 parent e4c64a7 commit e03049d

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

src/test/resources/regressions/features/assertby/assertby-proof-empty-block.gobra

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
package assertbyproofemptyblock
88

99
func foo(x, y int) {
10+
// due to #1000, assert by proof are currently rejected by the type checker
11+
//:: ExpectedOutput(type_error)
1012
assert true by {}
1113

12-
//:: ExpectedOutput(assert_by_error:assert_by_proof_body_error)
14+
// due to #1000, assert by proof are currently rejected by the type checker
15+
// ExpectedOutput(assert_by_error:assert_by_proof_body_error)
16+
//:: ExpectedOutput(type_error)
1317
assert x <= y by {}
1418
}

src/test/resources/regressions/features/assertby/assertby-proof-fail-01.gobra

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
package assertbyprooffail01
55

66
func foo(x, y int) {
7-
//:: ExpectedOutput(assert_by_error:assert_by_proof_body_error)
7+
// due to #1000, assert by proof are currently rejected by the type checker
8+
// ExpectedOutput(assert_by_error:assert_by_proof_body_error)
9+
//:: ExpectedOutput(type_error)
810
assert false by {
911
mylemma(x, y)
1012
}

src/test/resources/regressions/features/assertby/assertby-proof-no-leak.gobra

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
package assertbyproofnoleak
88

99
func foo(x, y, z int) {
10+
// due to #1000, assert by proof are currently rejected by the type checker
11+
//:: ExpectedOutput(type_error)
1012
assert x <= y by {
1113
mylemma(x, y, z)
1214
}
@@ -15,7 +17,9 @@ func foo(x, y, z int) {
1517

1618
// y <= z was established inside the proof block via mylemma
1719
// but should NOT be available here
18-
//:: ExpectedOutput(assert_error:assertion_error)
20+
// due to #1000, assert by proof are currently rejected by the type checker so this example does not even reach the
21+
// verification phase, so the following assertion error is commented:
22+
// ExpectedOutput(assert_error:assertion_error)
1923
assert y <= z
2024
}
2125

src/test/resources/regressions/features/assertby/assertby-proof-simple-01.gobra

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44
package assertbyproofsimple01
55

66
func foo(x, y int) {
7+
// due to #1000, assert by proof are currently rejected by the type checker
8+
//:: ExpectedOutput(type_error)
79
assert x <= y by {
810
mylemma(x, y)
911
}
1012

1113
assert x <= y
1214

13-
//:: ExpectedOutput(assert_error:assertion_error)
15+
// due to #1000, assert by proof are currently rejected by the type checker so this example does not even reach the
16+
// verification phase, so the following assertion error is commented:
17+
// ExpectedOutput(assert_error:assertion_error)
1418
assert false
1519
}
1620

0 commit comments

Comments
 (0)