Skip to content

Commit 7f93023

Browse files
Update tests
1 parent d93fcb1 commit 7f93023

File tree

103 files changed

+18659
-12220
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+18659
-12220
lines changed

tests/creusot-contracts/creusot-contracts.coma

Lines changed: 15257 additions & 10751 deletions
Large diffs are not rendered by default.

tests/creusot-contracts/creusot-contracts/why3session.xml

Lines changed: 235 additions & 16 deletions
Large diffs are not rendered by default.

tests/should_fail/bug/01_resolve_unsoundness.coma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module M_01_resolve_unsoundness__make_vec_of_size [#"01_resolve_unsoundness.rs"
2020
let%span sord'9 = "../../../creusot-contracts/src/logic/ord.rs" 167 40 167 73
2121
let%span sord'10 = "../../../creusot-contracts/src/logic/ord.rs" 168 39 168 69
2222
let%span sord'11 = "../../../creusot-contracts/src/logic/ord.rs" 173 39 173 84
23-
let%span sord'12 = "../../../creusot-contracts/src/logic/ord.rs" 230 16 236 17
23+
let%span sord'12 = "../../../creusot-contracts/src/logic/ord.rs" 260 16 266 17
2424
let%span smodel = "../../../creusot-contracts/src/model.rs" 62 8 62 22
2525

2626
use creusot.prelude.Opaque

tests/should_fail/bug/1204.coma

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ module M_1204__evil [#"1204.rs" 8 0 8 22]
22
let%span s1204 = "1204.rs" 6 11 6 16
33
let%span s1204'0 = "1204.rs" 7 10 7 11
44
let%span s1204'1 = "1204.rs" 9 4 9 16
5+
let%span swell_founded = "../../../creusot-contracts/src/well_founded.rs" 44 8 44 33
56

67
use mach.int.Int
78

9+
predicate well_founded_relation (self: int) (other: int) =
10+
[%#swell_founded] self >= 0 /\ self > other
11+
812
meta "compute_max_steps" 1000000
913

1014
meta "select_lsinst" "all"
@@ -14,7 +18,7 @@ module M_1204__evil [#"1204.rs" 8 0 8 22]
1418
function evil [#"1204.rs" 8 0 8 22] (x'0: int) : int
1519

1620
goal vc_evil: ([%#s1204] false)
17-
-> ([@expl:evil requires] [%#s1204] false) /\ 0 <= ([%#s1204'0] x) /\ ([%#s1204'0] - x) < ([%#s1204'0] x)
21+
-> ([@expl:evil requires] [%#s1204] false) /\ well_founded_relation ([%#s1204'0] x) ([%#s1204'0] - x)
1822
end
1923
module M_1204__wrong [#"1204.rs" 14 0 14 10]
2024
let%span s1204 = "1204.rs" 13 10 13 15
9 Bytes
Binary file not shown.

tests/should_fail/bug/692.coma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ module M_692__valid_normal [#"692.rs" 12 0 12 34]
130130
let%span sord'9 = "../../../creusot-contracts/src/logic/ord.rs" 167 40 167 73
131131
let%span sord'10 = "../../../creusot-contracts/src/logic/ord.rs" 168 39 168 69
132132
let%span sord'11 = "../../../creusot-contracts/src/logic/ord.rs" 173 39 173 84
133-
let%span sord'12 = "../../../creusot-contracts/src/logic/ord.rs" 230 16 236 17
133+
let%span sord'12 = "../../../creusot-contracts/src/logic/ord.rs" 260 16 266 17
134134
let%span sresolve = "../../../creusot-contracts/src/resolve.rs" 49 20 49 34
135135

136136
use creusot.int.UInt32

tests/should_fail/bug/695.coma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ module M_695__valid [#"695.rs" 12 0 12 27]
172172
let%span sord'9 = "../../../creusot-contracts/src/logic/ord.rs" 167 40 167 73
173173
let%span sord'10 = "../../../creusot-contracts/src/logic/ord.rs" 168 39 168 69
174174
let%span sord'11 = "../../../creusot-contracts/src/logic/ord.rs" 173 39 173 84
175-
let%span sord'12 = "../../../creusot-contracts/src/logic/ord.rs" 230 16 236 17
175+
let%span sord'12 = "../../../creusot-contracts/src/logic/ord.rs" 260 16 266 17
176176
let%span sresolve = "../../../creusot-contracts/src/resolve.rs" 49 20 49 34
177177

178178
use creusot.int.UInt32

tests/should_fail/generic_deref_ghost.coma

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ module M_generic_deref_ghost__deref_wrap [#"generic_deref_ghost.rs" 8 0 8 48]
1818

1919
use creusot.prelude.Any
2020

21-
type t_Target
22-
2321
type t_T
2422

23+
type t_Target
24+
2525
predicate precondition (self: ()) (args: t_T)
2626

2727
axiom precondition_fndef: [%#sgeneric_deref_ghost'3] forall args: t_T [precondition () args]. (let self_ = args in false)

tests/should_fail/generic_deref_snap.coma

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ module M_generic_deref_snap__deref_wrap [#"generic_deref_snap.rs" 8 0 8 48]
1818

1919
use creusot.prelude.Any
2020

21-
type t_Target
22-
2321
type t_T
2422

23+
type t_Target
24+
2525
predicate precondition (self: ()) (args: t_T)
2626

2727
axiom precondition_fndef: [%#sgeneric_deref_snap'3] forall args: t_T [precondition () args]. (let self_ = args in false)

tests/should_fail/ghost/control_flow.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ error: cannot use `return` in ghost code
1414
|
1515
= note: control flow cannot escape the `ghost!` block
1616

17-
error: cannot use `break` in ghost code
17+
error: cannot `break` to an outer loop in ghost code
1818
--> control_flow.rs:21:13
1919
|
2020
21 | break;
2121
| ^^^^^
2222
|
2323
= note: control flow cannot escape the `ghost!` block
2424

25-
error: cannot use `continue` in ghost code
25+
error: cannot `continue` to an outer loop in ghost code
2626
--> control_flow.rs:29:13
2727
|
2828
29 | continue;

0 commit comments

Comments
 (0)